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.
LVL 17
Theo KouwenhovenApplication ConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP Technology / Senior Consultant Commented:
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?
Theo KouwenhovenApplication ConsultantAuthor Commented:
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.
Gary PattersonVP Technology / Senior Consultant Commented:
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.
Get a highly available system for cyber protection

The Acronis SDI Appliance is a new plug-n-play solution with pre-configured Acronis Software-Defined Infrastructure software that gives service providers and enterprises ready access to a fault-tolerant system, which combines universal storage and high-performance virtualization.

Theo KouwenhovenApplication ConsultantAuthor Commented:
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
Gary PattersonVP Technology / Senior Consultant Commented:
Have you tried SETUSRASP, then referencing.path without iasp prefux?
Theo KouwenhovenApplication ConsultantAuthor Commented:
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"
Gary PattersonVP Technology / Senior Consultant Commented:
Sorry meant SETASPGRP.
Theo KouwenhovenApplication ConsultantAuthor Commented:

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?
Shalom CarmelCTOCommented:
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 :)
Shalom CarmelCTOCommented:
Also look at this thread, the problem is eerily similar

Theo KouwenhovenApplication ConsultantAuthor Commented:

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..
Theo KouwenhovenApplication ConsultantAuthor Commented:
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)
Theo KouwenhovenApplication ConsultantAuthor Commented:
I use the slower RTVDIRINF instead

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.