SETRC (Set the job step return code)

Purpose
Use the SETRC function to set the job step return code to a specified value. Use conditional parameters to set the return code based on an existing return code value.
Read syntax diagramSkip visual syntax diagram
Syntax

                 .-IFOP=EQ-.                 
>>-SETRC--RC=rc--+---------+--+----------+---------------------><
                 +-IFOP=GE-+  '-IFRC=rc2-'   
                 +-IFOP=GT-+                 
                 +-IFOP=LE-+                 
                 +-IFOP=LT-+                 
                 '-IFOP=NE-'                 

RC=rc
Defines the numeric value that the job step return code is set to.

Range: 0-9999

Note: If you do not specify the IFRC parameter with a value, the return code is automatically set to the specified value.
IFOP=nn
Use this parameter with the IFRC parameter. The IFOP parameter specifies the condition that must be met to set the RC=rc value.
EQ
The current return code must be equal to the value that is specified on the IFRC parameter.
GE
The current return code must be greater than or equal to the value that is specified on the IFRC parameter.
GT
The current return code must be greater than the value that is specified on the IFRC parameter.
LE
The current return code must be less than or equal to the value that is specified on the IFRC parameter.
LT
The current return code must be less than the value that is specified on the IFRC parameter.
NE
The current return code must not be equal to the value that is specified on the IFRC parameter.
Note: You must specify the IFRC parameter before using the IFOP parameter. If you do not specify a value, the default is IFOP=EQ.
IFRC=rc2
Defines the numeric value that is checked against the current job step return code. This is to determine if the job step return code is set to the RC=rc value.

Range: 0-9999

Note: The IFOP parameter determines the condition that must be met to set the job step return code.