A scheduled job does not inherit the library list of whoever created it: it uses the one from its job description. To see which one it is actually using:
DSPJOBD JOBD(PRODLIB/BATCHJOBD)
And to correct it:
CHGJOBD JOBD(PRODLIB/BATCHJOBD) +
INLLIBL(PRODLIB DATALIB QGPL QTEMP)
Which job description the schedule entry uses is shown by WRKJOBSCDE, option 5, field Job
description.
Warning
leave QTEMP last and do not remove QGPL: some system commands expect to
find it. Removing a library from the list of a job description used by several jobs breaks
them all at once, and the resulting error is CPF9801, which appears to be about a missing
object rather than a wrong list.
Tip
the fix that holds up over the years is not a longer library list but qualifying objects in the programs. A long library list is convenient until two libraries contain an object with the same name — and then the first one wins, silently.
Releases. DSPJOBD and CHGJOBD exist on any release. This recipe has no prerequisites.
Comments
No comments yet. Be the first to comment!
You need an account to comment. Log in · Sign up