Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Job and program monitoring

&pagelevel(5)&pagelevel

MONJVs are used to monitor program and job runs.
The user must define a job variable that is specified as an operand in the ENTER-JOB and START-PROGRAM commands. The operating system then assigns fixed values to these job variables at certain times and the values can be queried by the user in his command sequence. The job run can be controlled by means of these values.

Program/job monitoring with job variables can be used both on a standalone BS2000 system and in an MSCF network. Program and job runs and their termination results can be queried from any processor in the network. Appropriate responses can then be initiated via the event-controlled job processing function (see also the "Job Variables" manual [9 (Related publications)]).

Job variables for monitoring programs

Job variables for monitoring program runs contain a value that is set by the operating system and made up of the following two separate values:

  • Status display, length: 2 characters
    This indicates the current status of the program and can have the following values:

    $R
    $T
    $A

    Program was loaded
    Program was terminated normally
    Program was terminated due to program error or defined error output.

    • Return code display, length: 4 characters
      A code defined by the user in the program is returned to the job control.

    A job variable for monitoring the program run can be specified in the following commands:

    Command

    Explanation

    LOAD-PROGRAM ...,MONJV=...

    Loads a program and monitors the program run by means of specified job variables

    RESTART-PROGRAM ...,MONJV=...

    Restarts a program and monitors the program run by means of job variables

    START-PROGRAM ...,MONJV=...

    Loads and starts a program and monitors the program run by means of job variables

    Job variables for monitoring jobs

    Job variables for monitoring jobs contain a value which is set by the operating system and made up of separate values (see “Job variables“ [9 (Related publications)]). The most important ones are:

    • Status display, length: 2 characters
      This indicates the current status of the job and can have the following values:

      $S
      $R
      $T
      $A
      $M

      Job placed in job queue (for batch jobs only).
      Job being processed.
      Job was terminated normally.
      Job was terminated abnormally (e.g. CANCEL-JOB, system shutdown).
      Job was exported with MOVE-JOBS command

      • TSN display, length: 5 characters
        Task number of monitored job.

      • Catalog display, length: 8 characters
        Catalog ID of the processor on which the job is being executed.

      TSN and catalog display are set by the operating system when the job is initiated, i.e. either at LOGON or at the time of ENTER.

      A job variable can be specified for job monitoring in the following commands:

      Command

      Explanation

      ENTER-JOB ...,MONJV=...
      ENTER-PROCEDURE ...,MONJV=...

      Initializes a job and monitors the run by means of specified job variables

      SET-LOGON-PARAMETERS ... MONJV=...

      Starts a job and monitors the run by means of specified job variables

      If the monitoring job variable is protected by a password, the JV-PASSWORD operand must be specified in the commands.

      When a monitoring job variable is assigned to a job, the user can reference the job via this variable. The following commands can be used for this purpose:

      Command

      Explanation

      CANCEL-JOB

      Cancels the specified job

      CHANGE-TASK-PRIORITY

      Changes the run priority of the job

      MODIFY-JOB

      Changes the attributes of the job (to type 1)

      SHOW-JOB-STATUS

      Provides information about the job

      SHOW-RESOURCE-ALLOCATION

      Provides information about the resources assigned to the job

      Notes

      • The system part of job-monitoring job variables is protected by the system and cannot be changed by the used as long as the job variables are used for monitoring. At the end of the job (EXIT-JOB or LOGOFF), monitoring job variables are released again.

      • Wildcard specifications may not be used for job monitoring in job variable names, temporary job variables, JV link names or partially qualified names. For detailed information, see the "Job Variables" manual [9 (Related publications)].

      • The identification of jobs by monitoring job variables is especially recommended in an MSCF network because the TSN of an ENTER job in an MSCF network is not unique, but the job variable is. A job can therefore be identified anywhere in the relevant MSCF network by using a monitoring job variable (see following example).

      Example