Yes, by commands in the batch job such as ADDLIBLE or RMBLIBLE.
But I don't think that's what you wanted.
Perhaps someone knows how a user can do this?
Perhaps as part of debugging a batch job?
Phil
Hi,
I don't think it's possible - not even using STRSRVJOB.
Regards,
Martin Gilbert.
Not sure if this helps, but if you're looking at restoring the library list after the job is finished, this is what I do:
1st, declare a variable to hold existing library list
0025.00 DCL VAR(&USRLIBL) TYPE(*CHAR) LEN(2750)
Then go out and grab the existing list
0036.00 RTVJOBA USRLIBL(&USRLIBL)
Adjust the running library list as you see fit
0088.00 ADDLIBLE LIB(YOURLIB) POSITION(*LAST)
Finally, restore the library list to the saved list when the job is finished
however, note that RTNLIBL is a TAATOOL............
0092.00 RTNLIBL USRLIBL(&USRLIBL)
Regards,
Bob Strause
Last Wiki Answer Submitted: March 9, 2009 6:08 pm by Gilly40023,625 pts.
All Answer Wiki Contributors: Gilly40023,625 pts. ,
philpl1jb44,180 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
I HAVE NOT TRIED IT BUT YOU MAY BE ABLE TO
CALL ‘QCMDEXC’
WITH APROPRIATE ADDLIBLE /RMVLIBLE COMMANDS FROM WITHIN RPGLE AT DESIRED PLACE.
IT WILL WORK WITH FILE AND PRINTER OVER RIDES. SO MAYBE—–
Please state whether you want to alter the library list for the job, using instructions within the jobs own JCL, or whether you intend to alter the library list for an executing job, externally to the job.
I really don’t see how the latter can work. If you have to wait for the job to be active, then alter the library list, you will have to arrange some sort of pause, or it will be quicker than you are.
If you have to embed a pause in the JCL to wait for the library list change, then you should embed the logic to determine the library list, and change it.
I suggest you take a look at the CL Programming manuals in the concepts section. The answer’s always in the books.
I HAVE NOT TRIED IT BUT YOU MAY BE ABLE TO
CALL ‘QCMDEXC’
WITH APROPRIATE ADDLIBLE /RMVLIBLE COMMANDS FROM WITHIN RPGLE AT DESIRED PLACE.
IT WILL WORK WITH FILE AND PRINTER OVER RIDES. SO MAYBE—–
Lots of guesswork about the question here.
Please state whether you want to alter the library list for the job, using instructions within the jobs own JCL, or whether you intend to alter the library list for an executing job, externally to the job.
I really don’t see how the latter can work. If you have to wait for the job to be active, then alter the library list, you will have to arrange some sort of pause, or it will be quicker than you are.
If you have to embed a pause in the JCL to wait for the library list change, then you should embed the logic to determine the library list, and change it.
I suggest you take a look at the CL Programming manuals in the concepts section. The answer’s always in the books.