RESP and RESP2 options
CICS® sets a primary and sometimes a secondary response code when it completes a command, and provides options for you to inspect them.
The primary code returned by the RESP option is the general result - either NORMAL, meaning that the command executed successfully, or the name of an exception condition such as NOTAUTH (not authorized) or INVREQ (invalid request). The secondary code, returned by RESP2, provides a finer level of detail.
RESP values are like CVDAs in that there is a limited set of values, each of which is named, and CICS translates the value name to its numeric equivalent. EXEC interface block (EIB) response and function codes lists the correspondence, but use the value names in your code to keep it version- and platform-independent.
EXEC CICS SET FILE ('TAXFILE ') OPEN ENABLED
RESP(RC) END-EXEC.
IF RC = DFHRESP(NORMAL) PERFORM MAIN-RTN
ELSE IF RC = DFHRESP(NOTAUTH)
PERFORM SECURITY-WARNING
ELSE PERFORM ERR-RTN.EXEC CICS SET FILE ('TAXFILE ') OPEN ENABLED
RESP(RC) RESP2(RC2) END-EXEC and then test explicitly
for a remote file: IF RC2 = 1 . . .COBOL PIC S9(8) COMP
C and C++ long int
PL/I FIXED BIN(31)
Assembler F