Link to home
Start Free TrialLog in
Avatar of Theo Kouwenhoven
Theo KouwenhovenFlag for Netherlands

asked on

QShell problem on ASP

Hi Experts,

In a CL I collect information about *.CSV files in a specific IFS map.  /mypath/*.[Cc][Ss][Vv]
The output is redirected to an existing file /QSYS.LIB/PRODLIB.LIB/MYFILE.FILE/MYFILE.MBR

On our developementserver it worked fine.

Now we transfered the software to the testenvironment on the production server
And it still works as expected.

Once we tried it on the Production environment, it stop working, (the  /PRODLIB is located on ASP1).
so I added  /IASP1 to the path,
and still get the error:
qsh: 001-0055 Error found creating file /IASP1/QSYS.LIB/PRODLIB.LIB/MYFILE.FILE/MYFILE.MBR. No such path or directory.
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Do PRODLIB.LIB and MYFILE.FILE exist on iasp1?  Does the profile your are running under have adequate rights to create a new member in MYFILE.FILE?
Avatar of Theo Kouwenhoven


Hi Gary,

MYFILE.FILE and MYFILE.MBR are existing in PRODLIB.LIB, that is on the ASP.
I'm not sure if I can see that, so I did a test on the file by RTVOBJD and asked for the ASP info.
I already asked to check the authorization, but will check it myself again.

MYFILE.FILE, has only 1 member that will be replaces on every find.
Might also want to manually create the file.member, too.  I dont usually redirect to qsys.lib file system from qshell.or PASE.  Might be that it doesn't want to create a member, but can replace it, or clear it and write new contents.
Library file and member are available, (In test it is working)
The only difference is that test isn't on asp If i do a RTVOBJ on the testfile, the asp info returns *SYSBAS
Have you tried SETUSRASP, then referencing.path without iasp prefux?
Hi Gary,

I don't know the command SETUSRASP neither do iSeries :-(

In the meantime, I checked the 2 files in both libraries and the security and owner are identical,
so I would check the files on the IFS site with  "System i Navigator" and found the following...

in: [File Systems > Integrated File System> QSYS.LIB]
The production library is available, the testlibrary isn't ???

In:  [Databases > Tables]
The target-file is NOT available/visible in both environments

I'm 100% sure double checked with WRKOBJ *ALL/filename that the files are in those libraries.
The file is created without DDS, can that be the reason?

I did check the Testlibray with
WRKAUT OBJ('/QSYS.LIB/TESTLIB.LIB') and see the  authorization screen
when I do the same with

in QSH   cd /QSYS.LIB/PRODLIB.LIB  is already give an error "Error found changing to directory /QSYS.LIB/PRODLIB.LIB"
Sorry meant SETASPGRP.

SETASPGRP doesn't work,
First I tried it as an interactive command,
 Message-ID . . . . . . :   CPDB8EC                                              
 Message . . . . :   ASP group IASP1 not set for thread X'000000000000005E'.    
 Cause . . . . . :   An attempt to set the auxiliary storage pool (ASP) group   
   for the current thread failed. The reason code is 1.                         
     The reason codes are:                                                      
     1 - Set is not allowed by an active operating system function. For a list  
   of these functions, see the help for the SETASPGRP command.                  

Open in new window

So I created a CL to submit a test, including the SETASPGRP command.

When I looked to the logging I saw that the submitted job already contains a  SETASPGRP.
but the qsh command still not working. The log shows
ASP group set to IASP1.                                              
Job 040397/xxx/QDFTJOBD gestart op 24/08/18  10:45:37 in subsysteem QBATCH in QSYS. 
>> CALL PGM(MYLIB/##TEST)                             
   Command ended normally with exit status 2.

Open in new window

 as control i did the same in the testlibrary
ASP group set to IASP1.                                                    
Job 040380/xxx/QDFTJOBD starton 24/08/18  10:41:51 in subsysteem QBATCH in QSYS. 
>> CALL PGM(MYLIB/##TEST)                           
   Command ended normally with exit status 0.

Open in new window

Result was a record in the testfile

Is it possible that there is a separate ASP setting required for QSH, or an Environment Variable?
Afaik, when you issue the SETASPGRP command, all of the libraries referenced in the thread must be in the ASP.
However, QSH uses a path that includes the QSYS library - /QSYS.LIB/PRODLIB.LIB/MYFILE.FILE/MYFILE.MBR

But I am probably wrong, it's been a while :)
Also look at this thread, the problem is eerily similar

If I start qsh and go to the root '/', I see QSYS.LIB and IASP1 as entry ;
drwxrwsrwx     9 QSYS        0                  8192 Sep 16  2013 IASP1  
drwx---r-x  1377 QSYS        0              21241856 Aug 24 11:35 QSYS.LIB

in QSYS.LIB I can find TESTLIB.LIB, but not PRODLIB.LIB so I expected that I would find that in /IASP1, but it isn't there.
It could be a authorization issue, but I'm not sure if they should visible in the /IASP1 map..
Hi All,

I assume it can not be done, reason for assumtion:
  • When I use RTVDIRINF, it refuse to make a QTEMP file ; (the actual QTEMP isn't accesible from QSH)
  • When I use RTVDIRINF to a preferred libary/file, it always use a tempfile in QGPL and copy that on OS2-level to my preferred file, to prevent problems if the preferred file is in an ASP1 library?
  • No right answer is given (yet)
Avatar of Theo Kouwenhoven
Theo Kouwenhoven
Flag of Netherlands image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial