Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Program monitoring

&pagelevel(5)&pagelevel

Program monitoring job variables are not protected against overwriting. However, the first 128 bytes should not be used here either for user purposes as a system entry can be overwritten or this part may be overwritten by the system when the status changes.

The operating system sets the following two values in program-monitoring job variables:

Status indicator
Return code indicator

length: 3 characters
length: 4 characters

The status indicator can have the value “$R”, “$T” or “$A”.

Value

Meaning/reason for setting the value

$R

The program has been started/loaded or restarted.

$T

The program has been executed successfully (macro TERM MODE=NORMAL).

$A

The program has been terminated prematurely by a program error or a predefined error exit (macro TERM MODE=ABNORMAL) or aborted by a CANCEL-PROGRAM command.

Table 20: Status values for program monitoring

The return code indicator serves to transfer a return code defined by the user on program level to the job control level. The indicator can be set in the program by means of the TERM macro. The value is stored left-justified. The default value is 'BLANK''BLANK''BLANK''BLANK' for error-free termination.

Example

The command causes the contents of the program-monitoring job variable MONITOR to be output. The letter P (byte 17) means that job variable is being used to monitor a program.

/SHOW-JV JV=MONITOR

Output:%$R
P
Starting at position
13                           1718