Job management enables a differentiated and thus more economical job control. This effect mainly relies on the following two key features of job management:
Subdivision of jobs into job classes.
Job classes describe a job profile, combining jobs that share certain characteristic traits.
Assignment of job classes to job schedulers.
Systems support couples the job classes with up to 16 job schedulers, which may pursue different strategies and which determine which job is to be started next. System job class $SYSJC is permanently assigned to system job scheduler $SYSJS.
Normally all jobs released by the job schedulers are immediately passed to task management by the class scheduler and started.
After an overload or memory saturation situation has been cleared, preference is given to jobs of the class whose optimum has not yet been reached and which is the most urgent (depending on the number of jobs already running in the job class and the class weight). The class scheduler represents the interface to task management. It decides whether or not a job that has been released for execution is actually started.
Figure 17: Job management components
JMS support for the central calendar
It is possible to specify the start times for batch jobs via symbolic data from the BS2000 central calendar. This has resulted in the introduction of a new type of batch job, the calender job. The following three types are defined:
Scheduled job | a one-off batch job whose start time is specified by the user. |
Repeat job | a job which is repeated and whose repetition cycle depends on a repeat attribute specified by the user. |
Calender job | a scheduled job with the start attribute *AT(...), but which can be repeated according to specifications in a calendar. A calendar job is thus also a repeat job with a time limit imposed by specifications in the calendar (or in the LIMIT operand of the ENTER-JOB and |
The first execution and subsequent repetitions of a calendar job are handled equally by the system. The system does not distinguish - as it does for repeat jobs - between the “current” and “next image” of a calendar job. All runs of a calendar job have the same TSN. This allows better identification and monitoring of the job. Each individual run is managed by the job scheduler until the start time is reached: Once the preceding run has terminated, the next one is set up (same TSN) and passed on to the scheduler with the start attribute *AT(...) and the next start time of the symbolic date from the calendar.
The possible specifications for the start time depend on the stipulations of the central calendar (e.g. the repetition cycle is based only on days and not on hours). For further details, see the “CALENDAR” manual [7].
In contrast to repeat jobs, calendar jobs can be monitored with the aid of monitoring job variables (MONJVs). The MONJV remains open for the entire lifetime of the calendar job. Coupled with the fact that the TSN remains the same, this guarantees access to the job via the MONJV at any time.
Failed repetitions of a calendar job are repeated with the expired start date - in much the same way as the simple scheduled job. Afterwards the next start time is ascertained from the calendar.
The LIMIT operand of the ENTER-JOB and MODIFY-JOB commands can be used to limit the lifetime of a calendar job. Limits might be exceeded due to missing repetitions or delays in the scheduler, for example, but this is permissible. The lifetime can also be limited by setting a run counter. Once the limit is reached, the entire repeat job is terminated.
Command | Meaning |
CANCEL-JOB 1 | Cancel user job |
CHANGE-TASK-PRIORITY 1 | Change the job or task priority of an interactive, batch or print job |
ENTER-JOB | Start the command sequence stored in an ENTER file as a batch job, specifying its job class and job priority |
ENTER-PROCEDURE | Start the command sequence stored in a procedure as a batch job |
EXIT-JOB | Cancel the task |
FORCE-JOB-CANCEL | Cancel user job |
HOLD-JOB | Put a user job in the wait state |
HOLD-JOB-CLASS | Put a job class in the wait state |
HOLD-JOB-STREAM | Put a job stream and job scheduler in the wait state |
MODIFY-JOB 1 | Change the attributes of a user job |
MODIFY-JOB-CLASS | Change the limits and weighting of job classes |
MODIFY-JOB-OPTIONS | Change the values entered with ENTER-JOB, SET-LOGON-PARAMETERS and MODIFY-JOB-OPTIONS |
MODIFY-JOB-STREAM | Change the execution priority of the stream task and stream-specific parameters |
MODIFY-JOB-SWITCHES | Change the settings of job switches |
MOVE-JOBS | Export or import job descriptions |
RESUME-JOB | Cancel the wait state of a user job |
RESUME-JOB-CLASS | Cancel the wait state of a job class |
RESUME-JOB-STREAM | Cancel the wait state of a job stream and a job scheduler |
SET-LOGON-PARAMETERS | Start an interactive or batch job, specifying the job class and/or job priority |
SHOW-JOB-CLASS | Output information on job class attributes; this supports output in S variables |
SHOW-JOB-OPTIONS | Request information about the values set with ENTER-JOB, SET-LOGON-PARAMETERS and MODIFY-JOB-OPTIONS |
SHOW-JOB-STATUS 1 | Request information about a user job |
SHOW-JOB-STREAM | Request description of all job streams |
SHOW-SYSTEM-STATUS | Request information on job classes and job streams |
SHOW-USER-ATTRIBUTES | Request information about authorization for the job classes |
SHOW-USER-STATUS 1 | Request information on groups of user jobs |
START-JMP | Start program for the reconstruction of ENTER-JOB commands |
START-JOB-STREAM | Start a job stream and a job scheduler |
STOP-JOB-STREAM | Terminate a job stream and a job scheduler |
Macro | Meaning |
DJINF | Create a DSECT or data area for the JINF macro |
ENTER | Process an ENTER job |
JINF | Request job information |
JMGDJP | Create a DSECT or data area for the JMGJPAR macro |
JMGJPAR | Request job parameters |
JOBINFO | Request job information for selected jobs |
JSATTCH | Attach a job scheduler to JMS |
JSDETCH | Detach a job scheduler from JMS |
JSEXPCT | Request information about JSS events |
JSINFO | Request information about stream parameters |
JSRUNJB | Transfer a job for starting |
JSWAKE | Initiate a timer event for the job scheduler |
LGOFF | Terminate job |
SWITCH | Request information about and modify user and job switches |
TMODE | Request information about job attributes |
Table 25: Overview of commands for job management
1 With these commands it is also possible to process batch jobs which have been created by the calling user ID but which run under a different user ID