Previous Topic

Next Topic

Book Contents

Book Index

Step Values

PGMST

Within an ON PGMST statement, the specified step is generally a program step, specified in the PGMST field. It may be a program executed directly within the job stream, in which case no PROCST value is specified, or it may be a program executed by a called procedure, in which case the called procedure is specified in PROCST.

If the JCL contains nested procedures, the name of the EXEC procedure statement that invokes the most deeply nested procedure, that is, the procedure that immediately invokes the PGM step, must be specified in PROCST.

The same step name can appear in different ON PGMST statements in the same ON PGMST block, or in different ON PGMST blocks.

STEP RANGE

To check codes in a range of steps, first define the step range and assign it a name in the STEP RANGE statement, which is described in STEP RANGE: Post–Processing Parameter. Then specify the name, preceded by an asterisk, in the PGMST field. The * indicates that the specified name is a range name, not a step name. The range of steps is displayed, and you can check the codes that are displayed within the defined range.

If the LASTSTEP parameter is set to Y in the CTMPARM member, Control-M treats the job step named $LAST as the job step executed last, and the job step named $FIRST as the job step executed first.

If Control-M adds a Control-M/Restart step to a job, for example, if a job is restarted by Control-M/Restart, or if PREVENT NCT2 is specified in the job scheduling definition, the Control-M/Restart step is processed like all other job steps.

Control-M does not treat the Control-M/Restart step or any FLUSHED step as the step executed last or first.

STEP RANGE Example 1

In the STEP RANGE statement, name DF2 is assigned to the range of program steps STEP20 through STEP29A.

If *DF2 is specified in ON PGMST, the ON step and code criteria is satisfied if any of the codes result from any of the steps in the range STEP20 through STEP29A.

STEP RANGE Example 2

You want to define a job in such a way that its status depends on the result of the last step executed. If the last step ended with a condition code of 0, give the job the status ENDED OK. If the last step ended with any other condition code, the job status is to be ENDED NOTOK.

The following are sample ON PGMST statements for such a job:

ON PGMST ANYSTEP  PROCST          CODES C****  U**** S***              A/O  

DO OK

ON PGMST $LAST    PROCST          CODES >C0000 U**** S***              A/O  

DO NOTOK

Parent Topic

ON PGMST: Post–Processing Parameter