Add library to jobD library list

6345 pts.
Tags:
AS/400 jobs
AS/400 Library
Job Description
JOBD
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.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    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
    125,585 pointsBadges:
    report
  • WoodEngineer
    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.
    6,345 pointsBadges:
    report
  • pdraebel
    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,580 pointsBadges:
    report
  • WoodEngineer
    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.
    6,345 pointsBadges:
    report
  • PGMBOB
    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.
    980 pointsBadges:
    report
  • WoodEngineer
    We need to keep the same jobD names to minimize problems.
    6,345 pointsBadges:
    report
  • Splat
    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.
    6,865 pointsBadges:
    report
  • WoodEngineer
    [...] Add library to jobD library list [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following