× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thank you everyone.
RTVJOBA returns the user library list as 11 characters each, right padded
with spaces.
RTVSYSVAL QUSRLIBL returns the library list as 10 characters each and may
run up against each other.
So, using the QCMDEXC technique I can easily go back to the value returned
by RTVJOBA. Switching over to QUSRLIBL requires looping to ensure there's
a space between parameters.
QUSRLIBL is limited to 10 libraries while the other one goes up to 250.
So, since one has to loop, I guess the smaller one is better.

This works:
/* Group Dekko Services, LLC */
/* ALL RIGHTS RESERVED. */
/* */
/* This program will ... */
/* */
/* */
/* Modification log: */
/* mm/dd/yy by R.Berendt, CDP GDS,LLC */
/* Created */
/* */
/* */
PGM
DCL &JOBLIBL *CHAR 2750 /* User part of library list */
DCL &USRLIBL *CHAR 250 /* User part of library list */
DCL &CMD *CHAR 3000
DCL &X *INT


DSPJOB OUTPUT(*PRINT)
RTVJOBA USRLIBL(&JOBLIBL)
RTVSYSVAL SYSVAL(QUSRLIBL) RTNVAR(&USRLIBL)
CHGVAR (&CMD) ('CHGLIBL LIBL(')
DOFOR VAR(&X) FROM(1) TO(250) BY(10)
CHGVAR (&CMD) (%TRIMR(&CMD) *BCAT %SUBSTRING(&USRLIBL &X 10))
ENDDO
CHGVAR (&CMD) (%TRIMR(&CMD) *CAT ') CURLIB(*SAME)')
CALL QCMDEXC PARM(&CMD 3000)
/* CHGLIBL LIBL(&USRLIBL) CURLIB(*SAME) */

DSPJOB OUTPUT(*PRINT)
CHGVAR (&CMD) ('CHGLIBL LIBL(' *CAT %TRIMR(&JOBLIBL) *TCAT ')
CURLIB(*SAME)')
CALL QCMDEXC PARM(&CMD 3000)
/* CHGLIBL LIBL(&JOBLIBL) CURLIB(*SAME) */
DSPJOB OUTPUT(*PRINT)

END:
ENDPGM

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.