Setting the return code (R15) at termination

The external CICS® interface does not clear register 15 at termination, regardless of whether your client program executes normally or not. Therefore, even if your MVS™ client program terminates normally after successfully using the external CICS interface, the job step could end with an undefined return code.

To ensure a meaningful return code is given at termination, set the job step return code before terminating your program. The sample client programs illustrate how you can do this, using the saved response code from last call to the external CICS interface. For example, the COBOL sample DFH0CXCC program moves SAVED-RESPONSE to special register RETURN-CODE before terminating.