Avatar of Theo Kouwenhoven
Theo Kouwenhoven
Flag 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

QSH CMD('find /mypath/*.[Cc][Ss][Vv] > /QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYFILE.MBR')  
On our developementserver it worked fine.

Now we transfered the software to the testenvironment on the production server
find /mypath/*.[Cc][Ss][Vv] > /QSYS.LIB/TESTLIB.LIB/MYFILE.FILE/MYFILE.MBR  
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,
find /mypath/*.[Cc][Ss][Vv] > /IASP1/QSYS.LIB/PRODLIB.LIB/MYFILE.FILE/MYFILE.MBR  
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.
SoftwareOperating Systems* AS400IBM System i

Avatar of undefined
Last Comment
Theo Kouwenhoven

8/22/2022 - Mon
Gary Patterson, CISSP

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 Kouwenhoven

ASKER
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 Patterson, CISSP

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.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Theo Kouwenhoven

ASKER
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 Patterson, CISSP

Have you tried SETUSRASP, then referencing.path without iasp prefux?
Theo Kouwenhoven

ASKER
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
/QSYS.LIB/PRODLIB.LIB  or  /IASP/QSYS.LIB/PRODLIB.LIB I get "Object not found"


in QSH   cd /QSYS.LIB/PRODLIB.LIB  is already give an error "Error found changing to directory /QSYS.LIB/PRODLIB.LIB"
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Gary Patterson, CISSP

Sorry meant SETASPGRP.
Theo Kouwenhoven

ASKER
Gary,

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)                             
   300 - QSH CMD('ECHO TEST > /QSYS.LIB/PRODLIB.LIB/MYFILE.FILE/MYFILE.MBR')   
   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)                           
   300 - QSH CMD('ECHO TEST > /QSYS.LIB/TESTLIB.LIB/MYFILE.FILE/MYFILE.MBR') 
   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 Carmel

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 :)
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Shalom Carmel

Also look at this thread, the problem is eerily similar

https://archive.midrange.com/midrange-l/201709/msg00144.html
Theo Kouwenhoven

ASKER
Hi,

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 Kouwenhoven

ASKER
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)
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER CERTIFIED SOLUTION
Theo Kouwenhoven

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question