z/OS Communications Server: SNA Programmer's LU 6.2 Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


General sequence of error checking

z/OS Communications Server: SNA Programmer's LU 6.2 Guide
SC27-3669-00

As with any RPL-based VTAM® macroinstruction, error information for the APPCCMD macroinstruction can be returned in two stages if the macroinstruction was issued asynchronously. In such cases, VTAM can pass back information when the request is accepted and when it is completed. (Refer to z/OS Communications Server: SNA Programming for complete details. Table 1 and Table 2 illustrate feedback completion information available at the two stages for the APPCCMD macroinstruction.) The completion codes are not set in the RPL or the RPL extension until the APPCCMD macroinstruction request completes. If the macroinstruction was issued synchronously, only completion information is returned.

For an asynchronous request that was accepted initially (register 15 equals 0 at the next instruction after the macroinstruction that was issued), the completion codes are available after the completion exit is scheduled or the completion ECB is posted. (You can issue the APPCCMD CONTROL=CHECK macroinstruction to make the RPL and RPL extension available for reuse by another macroinstruction request.) For a synchronous request or for an asynchronous request that was not accepted initially, the completion codes are available when the application program gets control at the next instruction following the macroinstruction request.

Register 15 contains the RTNCD value and register 0 contains the FDB2 value following the completion of the macroinstruction for synchronous APPCCMD requests or completion of the APPCCMD CONTROL=CHECK macroinstruction for asynchronous APPCCMD requests. However, a SYNAD or LERAD user exit routine can change register 15.

SYNAD and LERAD exit routines are not given control for APPCCMD macroinstruction errors except for a few errors indicated by a general return code higher than 0. For more information on these errors, see SYNAD and LERAD.

The starting points for checking feedback from an APPCCMD macroinstruction are registers 15 and 0. VTAM cannot always set the feedback fields in the RPL and RPL extension for certain errors, but the registers always contain valid feedback codes.

Register 15 contains the general return code from VTAM. Only a few values are defined for the general return code, and it gives a quick indication of whether the macroinstruction was successful. Register 0 contains either a conditional completion return code or recovery action return code. In the case of errors, it provides more detail on the cause of the error.

If both register 15 and register 0 are 0, the APPCCMD has completed (or been accepted) without error. If register 15 is 0 but register 0 contains X'0000000B', the request completed conditionally. This may not indicate an error. The application program must check the RCPRI (RPLRCPR) and RCSEC (RPLRCSC) fields in the RPL extension to determine whether an error occurred.

An RCPRI value of 0 indicates that no error occurred. The RCSEC field contains a nonzero value that contains information about the processing of the macroinstruction. For example, a successful CNOS request can complete without error, but be negotiated by the partner LU. In such cases, RCSEC is set to X'0002' to indicate that negotiation took place.

A nonzero value for RCPRI indicates abnormal completion of an APPCCMD macroinstruction. The RCPRI and RCSEC fields contain the information needed to determine the error.

The preceding guidelines all assumed a 0 general return code in register 15. Because VTAM support of LU 6.2 is designed to intercept many errors and present them to the application program in an orderly fashion, this will be the case for most APPCCMD errors. The normal situation would be a register 15, register 0 combination of X'00000000', X'0000000B' (general return code 0, conditional completion return code X'B'), with the RCPRI and RCSEC fields in the RPL extension containing return codes that define the error.

Errors that cause a general return code higher than 0 (usually X'4') indicate a logic error in the application program. They are most likely to occur during program development. These errors include:
  • Incorrectly setting an RPL or RPL address or using an asynchronous macroinstruction without an exit
  • Incorrectly setting an RPL extension or RPL extension address
  • Attempting to use an RPL or RPL extension marked as active
  • Using a non-APPCCMD CHECK macroinstruction to complete an APPCCMD macroinstruction or using an APPCCMD CONTROL=CHECK macroinstruction to complete a non-APPCCMD VTAM macroinstruction
For more information on these errors, see LERAD.
Note: Error conditions usually are reported to the application program as completion information for a macroinstruction after the macroinstruction completes. However, the application program might not be made aware of some error conditions until after the next command processes. (The exception to this situation would be if the error condition caused the session to end.) An operator display command indicates that the conversation is present until the application program is notified that the conversation failed, even though the conversation might have been deallocated.

Table 1 and Table 2 indicate when RPL and RPL extension fields are set by VTAM. (Refer to z/OS Communications Server: SNA Programming for complete details.)

Table 1. Completion conditions available at acceptance stage of asynchronous requests
Completion Condition Registers at Entry to LERAD/SYNAD Registers at Exit from LERAD/SYNAD Registers at NSI (LERAD/SYNAD not Available or not Applicable) RPL Feedback Fields Set
Request accepted

General return code=0

Recovery action return code=0

N/A N/A

R15=0

R0=0

RTNCD=0

FDB2=0

RCPRI not set

RCSEC not set

Conditional Completion

General return code=0

Conditional Completion code=X'0B'

N/A N/A N/A RTNCD=0

FDB2=X'0B'

RCPRI set

RCSEC set

Request not accepted due to environment error

General return code=4

Recovery action return code=X'10'

SYNAD entered

R15=SYNAD exit address

R0=X'10'

R15 and R0 set by SYNAD

R15=4

R0=X'10'

RTNCD=X'10'

FDB2=specific error return code

RCPRI not set

RCSEC not set

General logic error

General return code=4

Recovery action return code=X'14'

LERAD entered

R15=LERAD exit address

R0=X'14'

R15 and R0 set by LERAD

R15=4

R0=X'14'

RTNCD=X'14'

FDB2=specific error return code

RCPRI not set

RCSEC not set

Logic error due to invalid RPL

General return code=4

Recovery action return code=X'18'

LERAD entered

R15=LERAD exit address

R0=X'18'

R15 and R0 set by LERAD

R15=4

R0=X'18'

RTNCD not set

FDB2 not set

RCPRI not set

RCSEC not set

Logic error due to invalid RPL extension

General return code=4

Recovery action return code=X'1C'

LERAD entered

R15=LERAD exit address

R0=X'1C'

R15 and R0 set by LERAD

R15=4

R0=X'1C'

RTNCD not set

FDB2 not set

RCPRI not set

RCSEC not set

Logic error due to RPL in wrong state

General return code=4

Recovery action return code=X'20'

LERAD entered

R15=LERAD exit address

R0=X'20'

R15 and R0 set by LERAD

R15=4

R0=X'20'

RTNCD not set

FDB2 not set

RCPRI not set

RCSEC not set

Request not accepted because ACB is not open

General return code=32

No recovery action return code

LERAD/SYNAD not entered LERAD/SYNAD not entered Reg 15=32

Reg 0=Request code (see description of RPL's REQ field)

RPL not set
Table 2. Completion conditions for synchronous requests or CHECK of asynchronous requests
Completion Condition Registers at Entry to LERAD/SYNAD Registers at Exit from LERAD/SYNAD Registers at NSI (LERAD/SYNAD not Available or not Applicable) RPL Feedback Fields Set
Normal completion (no special conditions)

General return code=0

Recovery action return code=0

N/A N/A

R15=0

R0=0

RTNCD=0

FDB2=0

RCPRI=0

RCSEC=0

Normal completion (with special conditions)

General return code=0

Recovery action return code=X'B'

N/A N/A

R15=0

R0=X'B'

RTNCD=0

FDB2=X'B'

RCPRI=0

RCSEC=nonzero return code

Abnormal completion due to APPCCMD error

General return code = 0

Recovery action return code = X'B'

N/A N/A

R15=0

R0=X'B'

RTNCD=0

FDB2=X'B'

RCPRI=nonzero return code

RCSEC=nonzero return code

Abnormal completion due to environment error

General return code=4

Recovery action return code=X'10'

SYNAD entered

R15=SYNAD exit address

R0=X'10'

R15 and R0 set by SYNAD

R15=4

R0=X'10'

RTNCD=X'10'

FDB2=specific error return code

RCPRI not set

RCSEC not set

General logic error

General return code=4

Recovery action return code=X'14'

LERAD entered

R15=LERAD exit address

R0=X'14'

R15 and R0 set by LERAD

R15=4

R0=X'14'

RTNCD=X'14'

FDB2=specific error return code

RCPRI not set

RCSEC not set

Logic error due to invalid RPL

General return code=4

Recovery action return code=X'18'

LERAD entered

R15=LERAD exit address

R0=X'18'

R15 and R0 set by LERAD

R15=4

R0=X'18'

RTNCD not set

FDB2 not set

RCPRI not set

RCSEC not set

Logic error due to invalid RPL extension

General return code=4

Recovery action return code=X'1C'

LERAD entered

R15=LERAD exit address

R0=X'1C'

R15 and R0 set by LERAD

R15=4

R0=X'1C'

RTNCD not set

FDB2 not set

RCPRI not set

RCSEC not set

Logic error due to RPL in wrong state

General return code=4

Recovery action return code=X'20'

LERAD entered

R15=LERAD exit address

R0=X'20'

R15 and R0 set by LERAD

R15=4

R0=X'20'

RTNCD not set

FDB2 not set

RCPRI not set

RCSEC not set

Request not accepted because ACB is not open

General return code=32

No recovery action return code

LERAD/SYNAD not entered LERAD/SYNAD not entered Reg 15=32

Reg 0=Request code (see description of RPL's REQ field)

RPL not set

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014