5,570 pts.
 Add library to jobD library list
Does anyone have a utility that can add a library to the exsiting libraries in a jobD? I would like to avoid executing CHGJOBD over and over.

Software/Hardware used:
ASKED: January 25, 2011  9:33 PM
UPDATED: February 7, 2011  6:55 PM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 110,155 pts.

 

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.

 5,570 pts.

 

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 ‘)’)

 2,280 pts.

 

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.

 5,570 pts.

 

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.

 705 pts.

 

We need to keep the same jobD names to minimize problems.

 5,570 pts.

 

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.

 5,740 pts.