Monitor User-defined Events with Job Variables

The Job Report System of CFS offers the possibility of monitoring any events linked to a Job variable. Information can be passed to the user by means of the Job variable or a file.

The Job variables evaluated by CFS must conform to the following conventions:

Name CFS.JR.jr-id.xxxx

jr-id Job Report Id of the user monitoring the event linked to this JV. Normally, the JR-Id is set to the Job name in the LOGON command. The user can also set it explicitly to any value with the JRID command.

xxxxx Partial name freely selectable by the user.

The Job variable to be used must have been declared a Monitor Job variable. It is therefore possible for the user, via SETJV commands or SETJV macro calls, to insert a value such as '$T' (see below) at column 1 of the Job variable, and thus produce an event for the Job Report System.

Contents of the Job variables

Column Length

1 2 $T normal Termination (activates the Job Report)

$A abnormal Termination (activates the Job Report)

$R running (for STAJ display)

$S Queue (for STAJ display)

The meaning of the values is described below

3 126 not used

129    2 #F the following 54 bytes represents the name of a Job Report file. The contents of this file will be presented to the Job Report user after $T or $A is written to the Job variable.

#_ a message with a maximum length of 80 bytes will be displayed in the terminal system line if $T/$A is written to the Job variable.

131    54 Name of the Job Report file if '#F' was entered in the previous field.

185 26 Job Report System command to be executed when the Job Report mask is displayed. For example, a search can be initiated for a particular record in the Sysout file. For further information, see the JRIC command.

131    80 Text to be displayed to the user in the system line, should the event occur.

211    40 Job-Id. This is a free text field through which the event may be identified in the STAJ command. A message of up to 40 bytes long may also be entered here to provide information via the STAJ command about the current state of the Enter job.

251    4 not used

256 1 C After acknowledging the Job Report screen with the K1 key, or by entering E (End), the following fields of the Job variable will be replaced with blanks: the Job ID field (column 211, length 40) and the user text or JR file name (column 131, length 80).

Setting an Event

To be monitored, the Job variable must already exist when the user invokes CFS or executes a JR command. If the user wishes to monitor an event via a Job variable, the following steps are necessary:

Sequential SETJV commands must be issued to load the Job variable as from column 129 with the required information.

The user will be notified of the event (either by having the Job Report mask displayed, or by receiving a message in the system line of the terminal) as soon as the first column of the Job variable is overwritten with $T or $A.

User Action when notified about Events

Two cases should be distinguished:

a) If the name of a JR file was specified in the Job variable, that file will be displayed in a Job Report mask.

If the user acknowledges the Job Report mask by pressing the K1 key, the JRS will overwrite the Job variable from column 1 with the string '$S'. The Job variable is then released, and can be used to monitor other events.

If the command N is entered in the Job Report mask, the JRS will not modify the Job variable. The "inform user on the occurrence of an event" transaction will not be regarded as closed. The user will be notified of the event again when CFS is reloaded, or when the JR command is next executed.

b) The message to be displayed is written in the Job variable directly (Columns 131-211) and will be displayed on the system line of the user's terminal.

In this case, the JRS will automatically overwrite columns 1-2 with '$S'. The "inform user on the occurrence of an event" transaction will be regarded as closed.