Hi Rob
You can'tuse &USRLIBL for the list of libraries on CHGLIBL - that has to be something like this -
CHGLIBL LIBL(QTEMP QGPL)
With the variable, it is like this -
CHGLIBL LIBL('QTEMP QGPL')
There's an API for changing the library list - that might work.
HTH
Vern
----- Original Message -----
I have this simple little test program:
PGM
DCL &JOBLIBL *CHAR 2750 /* User part of library list */
DCL &USRLIBL *CHAR 250 /* User part of library list */
DSPJOB OUTPUT(*PRINT)
RTVJOBA USRLIBL(&JOBLIBL)
RTVSYSVAL SYSVAL(QUSRLIBL) RTNVAR(&USRLIBL)
CHGLIBL LIBL(&USRLIBL) CURLIB(*SAME) /* 1209 */
DSPJOB OUTPUT(*PRINT)
CHGLIBL LIBL(&JOBLIBL) CURLIB(*SAME) /* 1211 */
DSPJOB OUTPUT(*PRINT)
END:
ENDPGM
CALL A
Value 'QTEMP ' for parameter LIBL not a valid name.
Error found on CHGLIBL command.
Function check. CPF0001 unmonitored by A at statement 1209, instruction
X'0023'.
CPF0001 received by A at 1209. (C D I R)
? I
Value 'QTEMP ' for parameter LIBL not a valid name.
Error found on CHGLIBL command.
Function check. CPF0001 unmonitored by A at statement 1211, instruction
X'002F'.
CPF0001 received by A at 1211. (C D I R)
? D
Results of dump:
Variable Type Length Value
*...+....1....+....2....+
&JOBLIBL *CHAR 2750 'QTEMP QGPL '
+26 ' '
+51 ' '
...
&USRLIBL *CHAR 250 'QTEMP QGPL '
+26 ' '
+51 ' '
...
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.