CL Command Reference - SETDEPJS
CL Command List > SETDEPJS Reference
Description:
The Set Dependent Job using Job Scheduler (SETDEPJS) command allows you change the completion flag from *YES to *NO or vice versa for a predecessor job in a predecessor/successor relationship. The completion flag indicates whether a job has processed. This command allows you to indicate that a job has or has not completed so that a dependent job can be submitted or omitted from submission.
For instance, you could set up an end of day (EOD) job that runs every week day at 5:00 p.m.. A dependent job for end of week (EOW) processing could also set up that is scheduled to run on Friday after the EOD job is completed. A third job called EOWCHECK (end of week check) could be set up whose only purpose is to change the completion flag on the EOD job from *YES to *NO. This EOWCHECK job would run prior to 5:00 p.m. on Friday. The reason you would want to do this is to allow the EOW job to run on Friday after the EOD job is completed. The following command string could be used to accomplish this:
SETDEPJS PREDJOB(EOD) SUCCJOB(EOW) COMPLETE(*NO)
Examples:
Example 1: Changing a Predecessor Job
SETDEPJS PREDJOB(JOB10) SUCCJOB(JOB11)
This command sets job JOB10 to processed, thus freeing JOB11 to run as a successor job to JOB10.
Example 2: Triggering End-of-Week Processing
SETDEPJS PREDJOB(EOD) SUCCJOB(EOW) COMPLETE(*NO)
This command sets up an end-of-day (EOD) job that runs every week day at 5:00 p.m. A dependent (successor) job for end-of-week (EOW) processing could also be set up that is scheduled to run on Friday after the EOD job is completed. A third job called EOWCHECK (end of week check) could be set up whose only purpose is to change the completion flag on the EOD job from *YES to *NO. This EOWCHECK job would run prior to 5:00 p.m. on Friday. The reason you would want to do this is to allow the EOW job to run on Friday after the EOD job is completed. This command would be used in the EOMCHECK job.