Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Commands/macros for conditional job control

&pagelevel(4)&pagelevel

SHOW-CJC-STATUS

The user can use this command to obtain information on jobs with currently active applications of the conditional job control (CJC). The interrogation may be formulated for
processors, catalogs or job variables.

SKIP-COMMANDS

This command causes a branch within the command sequence, depending on the analysis of a condition specified as an operand.

If a SKIP-COMMANDS occurs in a command sequence, the values of all the job variables specified in the conditional operand are read immediately and the conditional expression is analyzed. If the result of the analysis is “condition satisfied”, a branch is made to the specified point in the command sequence. It is possible to branch to points in the command sequence which come before or after the SKIP-COMMANDS command. If the analysis result is “condition not satisfied”, processing continues with the command following the SKIP-COMMANDS command.

WAIT-EVENT

The WAIT-EVENT command is used to place a job in the wait state until either a specified condition has been satisfied or a predefined time interval has elapsed. In the latter case the user can use a label to specify the point at which the job is to be resumed after the interval has elapsed. The branch destination may be located before or after the WAIT-EVENT command in the command sequence. If no branch destination is specified, a branch is made to the next SET-JOB-STEP, EXIT-JOB, LOGOFF, END-PROCEDURE or IF-BLOCK-ERROR in the command sequence.

ADD-CJC-ACTION

By means of the ADD-CJC-ACTION command a job can wait repeatedly in asynchronous operation within a given time interval for a specified condition to be satisfied, while continuing normally with the processing of the next command sequence. Different actions can be defined for the two cases, “condition satisfied” and “timeout”.
Actions that are permitted include starting jobs (ENTER-JOB), starting procedures (ENTER-PROCEDURE) and setting job variables (MODIFY-JV)

A CJC command sequence begins with the ADD-CJC-ACTION command and ends with the END-CJC-ACTION command. Between these commands, two command sequences for “condition satisfied” and “timeout” may be inserted, with any number of permitted actions (ENTER-JOB, ENTER-PROCEDURE or MODIFY-JV commands). The command
sequences are stored by the system for subsequent execution. If the “condition satisfied” event occurs, a command currently being processed is still executed (WAIT-EVENT wait state is interrupted immediately) and the first CJC command sequence is processed. The job is then continued normally from the point at which the interruption occurred. Similarly, the second CJC command sequence is processed if a “timeout” occurs.
If the job is in program mode (including TU contingency), it is immediately interrupted and the specified CJC command sequence is executed. A return is then made to the point at which the program was interrupted.

Note

Whenever the “condition satisfied” event occurs, the CJC command sequence is
executed. If several iterations have been specified, a test is carried out before each pass to check that the condition is still true.
The time interval within which the system is to check the condition (timeout) can also be specified in the command.

The ADD-CJC-ACTION command remains effective in the system until

  • the job is terminated (EXIT-JOB or LOGOFF command) or aborted (CANCEL-JOB command),

  • the maximum number of “condition satisfied” events is reached,

  • the time interval expires (timeout),

  • the ADD-CJC-ACTION is deleted (REMOVE-CJC-ACTION), or

  • a catalog containing one of the job variables involved is exported.

Note

No checkpoint can be written (WRCPT macro) while the ADD-CJC-ACTION command is effective. A restart (RESTART-PROGRAM command) terminates all ADD-CJC-
ACTION commands still active.

END-CJC-ACTION

The END-CJC-ACTION command is used in the command sequence to terminate the CJC command sequence. A CJC command sequence begins with an ADD-CJC-ACTION command and ends with an END-CJC-ACTION command. All the commands which are to be executed in the case of “condition satisfied” or after expiry of the specified time (timeout) are contained between these delimiting commands.
After END-CJC-ACTION the CJC command sequence is stored under a job-related local number. Entering this number deletes a specific CJC command sequence (REMOVE-CJC-ACTION) again.

REMOVE-CJC-ACTION

When the REMOVE-CJC-ACTION command is specified, either a specific CJC command sequence or all CJC command sequences still in effect are rendered ineffective (ALL operand).
All the information stored relating to deleted CJC command sequences is deleted.

ONEVT (macro)

Users can employ the ONEVT macro to make changes in the values of job variables on program level in order to control the execution of the program. To this end a condition may be specified as the operand. Each time the value of a job variable used in the program is changed, the system checks whether the condition has been satisfied. The situation “condition satisfied” has the characteristics of an event as defined by TU eventing by way of so-called event items. This means that a corresponding event item must be created first with the ENAEI macro and either the expected event must be requested with SOLSIG or a contingency routine must be defined for it.

DONEVT (macro)

The DONEVT macro is used to cancel the ONEVT macro. Since the TIMEOUT value in SOLSIG can also be employed to stop the system waiting for an ONEVT condition (JV event), it is advisable (and logically mandatory) to use DONEVT and DISEI to prevent ONEVT having a “delayed” effect.

Otherwise, if ONEVT and SOLSIG are repeatedly executed using the same event item, this SOLSIG can be used to request a delayed event of the old ONEVT.
Alternatively, each time the ONEVT macro is called, a different value can be assigned to the POST operand in order to differentiate events of different ONEVTs and discard old ones.

Further details on the subject of eventing can be found in the “Executive Macros”
manual [ 4].

The table below shows the application domain for conditional commands and macros.

Command / macro

Program
level

Command level

Batch mode

Interactive mode

Proc. mode

Com.mode

Proc. mode

Com.mode

SHOW-CJC-STATUS

--

x

x

x

x

SKIP-COMMMANDS

--

x

x

x

--

WAIT-EVENT

--

x

x

x

x

ADD-CJC-ACTION

--

x

x

x

x

END-CJC-ACTION

--

x

x

x

x

REMOVE-CJC-ACTION

--

x

x

x

x

ONEVT

x

--

--

--

--

DONEVT

x

--

--

--

--

Table 21: Application domain for conditional commands and macros

Note

Temporary job variables in the commands/macros for conditional job control are only possible within the job which creates them.
Access to temporary JVs of another job is not possible.