I cannot shake an rc=42 upon completion of the script running SYSOBJH.
I do get the correct output from it - work files 1, 3, and 4 get populated accordingly, but for some reason the script terminates with an rc=42.
Any idea of why this might be?
The command list that I populate into CMSYNIN for execution is as follows:
echo LOGON SYSOBJH > $CMSYNIN
echo SYSOBJH UNLOAD TRACS* LIB SYSTEM OBJTYPE N NATTYPE V WHERE TRANSFER >> $CMSYNIN
echo STOP >> $CMSYNIN
I’m looking to unload DDM-s prefixed with TRACS from library SYSTEM.
Any suggestions are greatly appreciated!
Thank you very much,
Lawrence
Exit code 42 is a “batch mode driver error”, usually CMPRINT provides more information like pointing to a premature end of input etc, don’t you see any hint on CMPRINT ?
Long time no talk!
CMPRINT contains:
NEXT LOGON SYSOBJH
Logon accepted to library SYSOBJH.
NEXT SYSOBJH UNLOAD TRACS* LIB SYSTEM OBJTYPE N NATTYPE V WHERE TRANSFER
Input Command Data or ‘.’ to exit …
…so the immediate rc from Natural appears to be 1 - I guess 42 is what it translates into, by the time the shell script passes it back on Exit!?
CMPRT31 at our installation - North America, contains the following:
Page 1 06/18/19 12:06:13
SYSOBJH direct command processing:
Function completed successfully.
Page 2 06/18/19 12:06:13
12:06:13 *** SYSOBJH Error Report *** 06/18/2019
Error 6016 occurred in OBJHCMD in line 1108
Object Handler will be stopped.
I cannot see the code for OBJHCMD. Interestingly enough, I can execute OBJHCMD directly and get a return code of 0, BUT, on a couple of those runs I actually got data unloaded to files, while on some other runs, I got a 0 return code, got NO data, and when looking up CMPRT31 I’ve been told to executed SYSOBJH instead.
The execution of OBJHCMD is inconsistent from run to run. Thus, I quit trying that and went back to SYSOBJH, and I could NOT shake off the non-zero return code, though I’m actually unloading the data.
CMPRINT contains:
NEXT LOGON SYSOBJH
Logon accepted to library SYSOBJH.
NEXT SYSOBJH UNLOAD TRACS* LIB SYSTEM OBJTYPE N NATTYPE V WHERE TRANSFER
Input Command Data or ‘.’ to exit …