Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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)
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
PREDJOB | Predecessor job entry | Element list | Required, Positional 1 |
Element 1: Job | Name | ||
Element 2: Group | Name, *NONE | ||
Element 3: Group sequence | 1-99, *NONE | ||
SUCCJOB | Successor job entry | Single values: *ALL Other values: Element list |
Optional, Positional 2 |
Element 1: Job | Name | ||
Element 2: Group | Name, *NONE | ||
Element 3: Group sequence | 1-99, *NONE | ||
COMPLETE | Complete | *YES, *NO | Optional |
Top |
Specifies the name of the predecessor job schedule entry that you want to change. You must specify a job for every job and optionally can specify a group to which the job belongs as well as a sequence number for the job within the group.
The first job of a group must be sequence number 1. Subsequent sequence numbers should leave gaps (10, 20, 30 and so on) to allow job insertions if necessary.
This is a required parameter.
Element 1: Job
Element 2: Group
Element 3: Group sequence
Top |
Specifies the name of the successor job schedule entry that you want to change. You must specify a job for every job and alternately can specify a group to which the job belongs as well as a sequence number for the job within the group.
The first job of a group must be sequence number 1. Subsequent sequence numbers should leave gaps (10, 20, 30 and so on) to allow job insertions if necessary.
Single values
Element 1: Job
Element 2: Group
Element 3: Group sequence
Top |
Specifies whether you want to change the completion flag for a predecessor job from completed (*YES) or not completed (*NO) or vice versa.
Top |
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 EOWCHECK job.
Top |
Top |