Rob,
Because LIBL() is a list, I believe you will have to do one of two things.
1.  Parse out each library into individual variables and use them to CHGLIBL.
2.  Use a variable to build the CHGLIBL command then use QCMDEXC (or the QCAPCMD API) to run the command.
	CHGVAR VAR(&cmd) VALUE('CHGLIBL LIBL(' *TCAT &JOBLIBL *TCAT ') CURLIB(*SAME)')
	CALL QCMDEXC (&cmd &2778) (or use QCAPCMD)
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, June 18, 2013 9:15 AM
To: midrange-l@xxxxxxxxxxxx
Subject: CHGLIBL woes
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
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to:  2505 Dekko Drive
          Garrett, IN 46738
Ship to:  Dock 108
          6928N 400E
          Kendallville, IN 46755
http://www.dekko.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: 
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at 
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.