ON PGMST statements are usually, but not necessarily, followed by user-specified DO actions. The implied relationship between ON PGMST statements and associated DO statements is described in ON Statements: Post–Processing Parameter.
Multiple ON PGMST Statements and ON PGMST Blocks
In a new job scheduling definition, an empty ON PGMST statement is followed by an empty DO statement. Additional ON PGMST statements can be opened in the job scheduling definition as follows:
Multiple ON PGMST blocks are generally interpreted sequentially from first to last, except when an ON PGMST block contains an And/Or Boolean connector. All such blocks containing Boolean connectors are processed last regardless of their position in the list of ON PGMST blocks.
If the conditions of an ON PGMST block are satisfied, the accompanying DO actions are performed. The conditions of more than one ON PGMST block can be satisfied; therefore, more than one set of DO statements can be performed.
Example
One ON PGMST block specifies STEP1 as the program step, and >C0004 as the CODE.
A second ON PGMST block specifies ANYSTEP as the program step, and >C0008 as the CODE.
If STEP1 results in a condition code of C0016, the ON PGMST step and CODE event criteria for both ON PGMST statements are satisfied, and the DO actions accompanying both ON PGMST blocks are performed.
Example
ON PGMST STEP1 ... CODES C0004 ... A/O A
ON PGMST STEP5 ... CODES S0C4 ... A/O
DO SHOUT ...
In the above ON PGMST and DO statements, for the DO SHOUT action to be performed, STEP1 must end with a condition code of C0004, and STEP5 must end with an S0C4 system abend.
To add an empty ON PGMST statement between two existing ON PGMST statements, type the > character over the first letter in the ON PGMST value of the previous ON PGMST line, and press Enter.
Example
If the program step name is STEP1, type the following and press Enter:
ON PGMST >TEP1
This adds an "empty" ON PGMST line after the current ON PGMST statement. The STEP1 step name is restored to its original value when Enter is pressed (that is, the > character disappears and the S character is restored).
To delete unwanted ON PGMST statements, specify appropriate Line Editing commands in the Edit environment. For information on the Edit environment, see Editing Job Scheduling Definitions in the Edit Environment, and in particular Line Editing Commands.
Job/Step Completion Status Facility (JSCSF)
General ON PGMST definitions can be created using the Job/Step Completion Status Facility (JSCSF) and may override the in-job definitions. For more information, see the "The Job/Step Completion Status Facility (JSCSF)" section in the INCONTROL for z/OS Administrator Guide.
Parent Topic |