Previous Topic: #RES StatementNext Topic: Example


#SCC Statement

The #SCC statements in the execution JCL let you define step level condition code tests used to determine whether the job completed successfully.

This statement has the following format:

#SCC,COND=(xxxx[-yyyy],ro,{*|nnnnnnnn|jjjjjjjj.nnnnnnnn|*-nnnnnnnn|*-jjjjjjjj.nnnnnnnn})
#SCC

Identifies the statement as a step level condition code test. #SCC must begin in position 1 of the record.

COND

Identifies the following information as condition code test values.

xxxx

Specifies the condition code value to test against the actual value returned at execution time. The entry must be numeric and fall within the range of 0 to 9999.

A range of condition codes can be specified as xxxx-yyyy (or yyyy-xxxx) where xxxx is the minimum in the range of condition code values to be tested and yyyy is the maximum in the range of condition codes to be tested. Each entry must be numeric and fall within the range of 0 to 9999.

ro

Identifies the relational operator specifying the comparison to be made. If the condition code value returned has the relationship defined by the ro entry, the step value is unacceptable and the job is considered abnormally completed. For example, if ro is set to LT and xxxx is set to 8, the job is marked as completing abnormally if 8 is less than the return code from the step whose name matches the name in the nnnnnnnn parameter. The value must be one of the following:

GT

Specifies greater than.

GE

Specifies greater than or equal to.

EQ

Specifies equal to.

LT

Specifies less than.

LE

Specifies less than or equal to.

NE

Specifies not equal to.

FL

Specifies to mark the job abnormally terminated if the named step was flushed.

Note: Condition code values coded on the #SCC statement are ignored if an ro of FL is specified.

nnnnnnnn jjjjjjjj.nnnnnnnn

(For CPU Jobs) Specifies the step name (and optional procstepname) of the steps to test. An * (asterisk) entry indicates that the test applies to all job steps. A test that is to be applied to all job steps is a global #SCC test. To exclude a step from a global test, code the statement using the following format:

#SCC,COND=(xxxx,ro,*-nnnnnnnn)

A #SCC statement coded in this fashion indicates that the test is to apply to all job steps except the one named by nnnnnnnn.

If specifying a test that applies to a step in a cataloged or in-stream procedure, the jjjjjjjj identifies the EXEC statement of the calling job step; nnnnnnnn identifies the EXEC statement of the procedure step that issues the return code to be used in the test. If only nnnnnnnn is specified, the test is applied to all occurrences of that job step name or procedure step name.

(For XPJOB Jobs) Only nnnnnnnn should be specified, and it should be set to the CCI node name (or alias if present) where the job will execute (that is, the remote node). An * (asterisk) entry indicates that the test applies to all CCI node names. A test that is to be applied to all CCI node names is a global #SCC test. To exclude a CCI name from a global test, code the statement using the following format:

#SCC,COND=(xxxx,ro,*-nnnnnnnn)

A #SCC statement coded in this fashion indicates that the test is to apply to all job steps except the one named by nnnnnnnn.

Agent jobs cannot use #SCC statements because the agent determines success or failure of a job execution.