HCL Workload Automation, Version 9.4

Library list setting for IBM i jobs

About this task

The STREAMLOGON keyword does not have the same effect as an IBM i user profile that signs on to the system and issues a command. This is because the initial library list of the submitted job is, by default, that of the QMAESTRO user profile regardless of the STREAMLOGON value. To bypass the limitation of STREAMLOGON, use one of the following options:
Change the QMAESTRO job description to include all necessary libraries

You can use this option to avoid library list problems in either normal or extended mode. In this option, you stop the IBM i agent and change the QMAESTRO job description to include all necessary libraries in the IBM i library list.

Sign on with the QSECOFR user and end all the IBM i agent jobs. Then, change the initial library list in the QMAESTRO job description. *JOBD must be QMAESTRO in the QGPL library.

For example, if you want to add only the MINERMA library to the QMAESTRO initial library list, issue the following command
CHGJOBD JOBD(QGPL/QMAESTRO) INLLIBL(QGPL MINERMA)
After all of the necessary IBM i libraries are completed, you can restart the IBM i agent jobs.
In extended mode, use the SBMJOB parameters to access any necessary library

You can use this option to avoid library list problems only if you are in extended mode.

Use extended mode and explicitly set any necessary SBMJOB library-related keyword and the USER keyword, do not use default values when it is possible. Default values might not be sufficient to set the initial library list for a job run successfully under the IBM i agent. For example, consider the following job definition:
TWAS#TEST_003 DOCOMMAND "SUBMIT: CMD(CALL PGM(REPORTCL)) JOB(MYREPORT) 
JOBD(*USRPRF) JOBQ(QSYS/QSYSNOMAX) CURLIB(*USRPRF) INLLIBL(*JOBD)"
STREAMLOGON "PEPPE"
DESCRIPTION "Test N.3"
RECOVERY STOP

Before you put the above “command-string” in the schedule of the IBM i agent for execution, verify which libraries are involved in the CALL of the REPORTCL program. Then, if these libraries are not included in the initial library list of the QMAESTRO job description, set the parameters USER, JOBD, CURLIB, and INLLIBL to values that make all the necessary libraries visible at job execution.

In this sample, assume the following:
  • The REPORTCL program is inside the MINERMA library
  • When started, the REPORTCL program makes internal calls to other programs inside two libraries: PEPPE and MINERMA
  • PEPPE is the current library of the PEPPE user profile that does not have MINERMA in its job description initial library list
  • MINERMA is the current library of the MINERMA user profile that does not have PEPPE in its job description initial library list
Considering the verified data above, the sample “command-string” must be modified so that both the PEPPE and MINERMA libraries are visible at job execution. You can do this in one of the following ways, depending on your specific needs and the execution environment in which the job runs:
  • Modify INLLIBL(*JOBD) to INLLIBL(PEPPE MINERMA)
  • Add the MINERMA library to the initial library list of the PEPPE job description
  • Add the USER(MINERMA) parameter and add the PEPPE library to the initial library list of the MINERMA job description. Use this option only if the job must be executed under the MINERMA user profile.