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 wouldn’t expect many exact matches with utilities that others have. Can you describe the change you want to make to each *JOBD? I might have a number of commands that could make the task easy.
Tom, we need to add several libraries to the libraries already defined in various jobDs. We want to keep all the libraries already defined and just add another one.
I did find an example of retrieving a jobD’s library list using QWDRJOBD which I was able to adapt. However, I am still open to other suggestions.
Looks like you need to first retrieve the Current value of your Jobd’s library list, change the value to the one you want, then create a string with the CHANGE Command and execute that command with a QCMDEXC.
CHGVAR VAR(&CMD) VALUE(‘CHGJOBD AMAJOBD INLLIBL(‘ +
*CAT &LIBL *BCAT ‘)’)
ADDLIBLE will add one library at a time, *FIRST, *LAST, *AFTER or *BEFORE a named library. You know the library lust you want, just CHGLIBL. Create a new JOBD with the library list required.
I’d suggest using the Retrieve Job Description Information (QWDRJOBD) API to extract the job description initial library list then using the CHGJOBD command to reload the initial library list with the desired library appended.
I wouldn’t expect many exact matches with utilities that others have. Can you describe the change you want to make to each *JOBD? I might have a number of commands that could make the task easy.
Tom
Tom, we need to add several libraries to the libraries already defined in various jobDs. We want to keep all the libraries already defined and just add another one.
I did find an example of retrieving a jobD’s library list using QWDRJOBD which I was able to adapt. However, I am still open to other suggestions.
Looks like you need to first retrieve the Current value of your Jobd’s library list, change the value to the one you want, then create a string with the CHANGE Command and execute that command with a QCMDEXC.
CHGVAR VAR(&CMD) VALUE(‘CHGJOBD AMAJOBD INLLIBL(‘ +
*CAT &LIBL *BCAT ‘)’)
Thanks for your suggestions. We ended up using an API to retrieve the JOBD’s library list, modify it, then execute the command string via QCMDEXEC.
We added an option parm to add / remove a library from the list.
So far, so good.
ADDLIBLE will add one library at a time, *FIRST, *LAST, *AFTER or *BEFORE a named library. You know the library lust you want, just CHGLIBL. Create a new JOBD with the library list required.
We need to keep the same jobD names to minimize problems.
I’d suggest using the Retrieve Job Description Information (QWDRJOBD) API to extract the job description initial library list then using the CHGJOBD command to reload the initial library list with the desired library appended.