Job monitoring job variables should, regardless of which interface is used to operate them (e.g. JMS, SPOOL, BCAM, DSSM) have a uniform structure and uniform contents to the extent that this is possible. Job monitoring in the sense of this convention are all monitoring job variables that are not monitoring programs.
The following structure is supported for the system section:
Byte | Meaning/possible values | Entered by |
1-3 | Status of the job:
From JV V13.0B onwards, “$XY” for example will also be possible in the future in addition to the previous values “$R”, “$T”, “$A”, “$S” and “$M”. | System components 1) |
4 | Contains the value null (0). | MONJV handler |
5-8 | TSN of the job. | System components 1) |
9-12 | Catalog ID of the home pubset. | MONJV handler |
13-16 | Contains spaces. | MONJV handler |
17 | Type of MONJV: Any character from “A” to “Z” can be chosen | System components 1) |
18-20 | Current system session number | MONJV handler |
21-36 | Start of the job (open the MONJV) in GMT time. | MONJV handler |
37-52 | Time stamp to be able to log the time of an activity in GMT time during a job. | User 2) |
53-60 | Name of the application to be monitored. | User 2) |
61-70 | Reserved. | |
71-128 | Application specific information. Bytes 105 through 128 may possible be used by the job management system AVAS. | User2) |
Table 14: Structure of a job monitoring job variable
1System components that perform the monitoring function (e.g. JMS, SPOOL, DMS).
2The user can supply these elements via the command MODIFY-MONJV or the macro TIMJV
The TSN and catalog ID serve to identify the monitored job when the name of its job variable is specified.
Both values are set by the corresponding system components when the job is initiated, i.e. when either LOGON or ENTER is issued.
The values for the status of the job and catalog ID are always given left-justified and filled with spaces (X'40'), while the TSN indicator is entered right-justified with leading zeros. Within the first 128 bytes (system area), all unused bytes are filled with spaces (X'40').
In SPOOL and cancel jobs, parts of the area of the first 128 bytes are required. You will find more detailed descriptions of the structure of the job variables for spool jobs in the “SPOOL” manual [ 13] and for cancel jobs in the “Commands” manual [ 1]. If the job was terminated abnormally, the status indicator of a monitoring job variable is set to the value $A. In addition, the information about the originator in abbreviated form and the comment are transferred from the TEXT operand of the CANCEL-JOB command to the system part (the first 128 bytes) of the monitoring job variable.
If the job is started for another user ID, the job variable must also be accessible to this user ID. If it is not, no status changes can be logged once the job has been accepted. The value of the status indicator remains on “$S” and the job variable is protected (MONJV protection) even though the job may have been ended.
An active monitoring job variable cannot simultaneously be assigned as a monitoring job variable to another job or program.
If access to the monitoring job variable is lost during job processing, the system's response depends on the status of the catalog containing the JV.
For reasons of job execution security it is advisable to create the monitoring job variable on the same computer on which the job itself will be processed.
Note
Specifying a temporary job variable, a JV link name or a JV subarea as a monitoring job variable is not permissible and any attempt to do so will be rejected.
Status values for interactive jobs:
Value | Meaning/reason for setting the value |
$R | The LOGON process was successfully executed and a job was initiated. |
$T | The job was terminated normally (EXIT-JOB MODE=NORMAL or LOGOFF). |
$A | The job was terminated abnormally (EXIT-JOB MODE=ABNORMAL, CANCEL-JOB or system shutdown) or job monitoring was terminated prematurely or transferred to another job variable (MODIFY-JOB-OPTIONS). |
Table 15: Status values for interactive jobs
Status values for batch jobs:
Value | Meaning/reason for setting the value |
$S | The job was entered in the job queue as a result of an ENTER-JOB command after a successfully completed “SPOOL-IN”. |
$R | The job was selected from the job queue and started. |
$M | The job was exported from the current job pool with the MOVE-JOBS command |
$T | The job was terminated normally (EXIT-JOB MODE=NORMAL or LOGOFF). |
$A | The job was terminated abnormally (EXIT-JOB MODE=ABNORMAL, CANCEL-JOB or system shutdown) or job monitoring was terminated prematurely or transferred to another job variable (MODIFY-JOB-OPTIONS). |
Table 16: Status values for batch jobs
Examples
The /SHOW-JV command causes the contents of the job monitoring job variable MON.JOB to be output. The letter J (byte 17) means that the job variable MON.JOB is being used to monitor a job.
/SHOW-JV JV=MON.JOB
Output: % | $R | 0 | 1ULW | 10SB | J | 068 | 2010-11-14161559 | 2010-11-14161807 | Appl | Info |
Starting at position | 1 | 4 | 5 | 9 | 17 | 18 | 21 | 37 | 53 | 71 |
The /SHOW-JV command causes the contents of the job monitoring job variable MON.SPOOL to be output. The letter S (byte 17) means that the job variable MON.SPOOL is being used to monitor a spool job. For an explanation of all further and additional field contents, refer to the “SPOOL” manual [ 13].
/SHOW-JV JV=MON.SPOOL
Output: % | $R | 0 | 1ULW | 10SB | S | 068 | 2010-11-14161559 | 2010-11-14161807 | Appl | Info |
Starting at position | 1 | 4 | 5 | 9 | 17 | 18 | 21 | 37 | 53 | 71 |