gtpc2ma3C/C++ Language Support User's Guide

Return Codes for Basic Conversation Functions

Each TPF/APPC function returns a 6-byte return code. The return code consists of a 2-byte primary return code placed in an unsigned short integer and a 4-byte secondary return code placed in an unsigned long integer.

The primary return code contains a zero value for normal return. In general, when the primary return code is zero, the secondary return code has no meaning. The following functions are exceptions to this; for these functions the secondary return code does contain meaningful information on a normal return:

tppc_activate_on_confirmation

tppc_activate_on_receipt

tppc_test

tppc_wait.

The primary return code contains a nonzero value for an error return. In general, the secondary return code provides more detailed error information. There are exceptions to this; some of the primary return codes do not have a secondary code associated with them.

Table 37 contains a list of all the primary return codes and their meanings, and Table 38 contains a list of all the secondary return codes and their meanings. Not all return codes are possible for every function. The individual TPF/APPC function descriptions document the valid return codes for that TPF/APPC function. The symbolic names of the return code values are defined in the tppc.h include file.

Table 37. Primary Return Codes

Symbolic Name Hex Value Meaning
LU62RC_OK 0000 The function completed successfully.
LU62RC_PARAMETER_CHECK 0001 An invalid parameter was detected. Check the secondary return code.
LU62RC_STATE_CHECK 0002 An invalid state was detected. Check the secondary return code.
LU62RC_ALLOC_ERROR 0003 An allocation error occurred. Check the secondary return code.
LU62RC_DLLOC_ABEND_PGM 0006 An error occurred, and the conversation was deallocated.
LU62RC_DLLOC_ABEND_SVC 0007 An error occurred, and the conversation was deallocated.
LU62RC_DLLOC_ABEND_TMR 0008 An error occurred, and the conversation was deallocated.
LU62RC_DLLOC_NORMAL 0009 The conversation was deallocated.
LU62RC_POSTING_NOTACTIV 000B Posting is not active for the specified conversation.
LU62RC_PGMERR_NOTRUNC 000C A program error occurred. Data was not truncated.
LU62RC_PGMERR_TRUNC 000D A program error occurred. Data was truncated.
LU62RC_PGMERR_PURGING 000E A program error occurred. Data was purged.
LU62RC_CONVFAIL_RETRY 000F The conversation failed due to a session outage.
LU62RC_CONVFAIL_NORETRY 0010 The conversation failed due to a protocol error.
LU62RC_SVCERR_NOTRUNC 0011 A service program error occurred. Data was not truncated.
LU62RC_SVCERR_TRUNC 0012 A service program error occurred. Data was truncated.
LU62RC_SVCERR_PURGING 0013 A service program error occurred. Data was purged.
LU62RC_LLRCV_UNSUCESFUL 0014 The condition checked by the tppc_test function was not set. See the tppc_test function description for further information.
LU62RC_ALLOC_UNSUCESFUL 0015 The tppc_allocate function with ALLOCATE_RCONTROL_IMM was not able to allocate a session to this conversation immediately.
LU62RC_TPF_ABEND FFFF This indicates a system abend or time-out.

Table 38. Secondary Return Codes

Symbolic Name Hex Value Meaning
LU62RC_POSTED_DATA 00000000 The conversation was posted. The information available is data.
LU62RC_POSTED_NOTDATA 00000001 The conversation was posted. The information available is not data.
LU62RC_PK_BAD_TCBID 00000001 A parameter check was detected. The TCB ID is invalid.
LU62RC_PK_BAD_CONVID 00000002 A parameter check was detected. The resource ID is invalid.
LU62RC_PK_EMPTY_RESIDL 00000003 A parameter check was detected. The resource list specified on the tppc_wait function is empty.
LU62RC_ALLOCERR_NORETRY 00000004 An allocation error occurred. Do not retry the request.
LU62RC_ALLOCERR_RETRY 00000005 An allocation error occurred. Retry the request.
LU62RC_INVALID_LENGTH 00000006 A parameter check was detected. The length parameter coded on the tppc_post_on_receipt, tppc_receive, or tppc_send_data function exceeds the maximum value of 32,767.
LU62RC_AOC_INCOMPLETE 00000009 The tppc_activate_on_confirmation function was accepted. The program specified (pgm) is activated when the confirm request is complete.
LU62RC_AOR_INCOMPLETE 00000009 The tppc_activate_on_receipt function verb was accepted. The program specified (pgm) is activated after the data or other information is received.
LU62RC_SECURITY_NOT_VALID 080F6051 An allocation error occurred. The security information is invalid.
LU62RC_SKCNFRM_BADSTATE 00000032 A state check occurred. This can occur if tppc_confirm or tppc_activate_on_confirmation with AOC_CONFIRM is called when the conversation is not in send state or while in the middle of sending a logical record.
LU62RC_SKCNFRM_INVALID 00000033 A state check occurred. tppc_confirm or tppc_activate_on_confirmation with AOC_CONFIRM was called for a conversation allocated with ALLOCATE_SYNC_NONE.
LU62RC_SKCNFMD_BADSTATE 00000041 A state check occurred. tppc_confirmed was called, but the conversation is not in received-confirm, received-confirm-send, or received-confirm-deallocate state.
LU62RC_PKDLLOC_BADTYPE 00000051 A parameter check was detected. tppc_activate_on_confirmation with AOC_DEALLOC or tppc_deallocate with DEALLOCATE_TYPE_CONFIRM was requested on a conversation allocated with ALLOCATE_SYNC_NONE.
LU62RC_SKDLLOC_FLUSH 00000052 A state check occurred. This can occur if tppc_deallocate is called with DEALLOCATE_TYPE_FLUSH when the conversation is not in send state or while in the middle of sending a logical record.
LU62RC_SKDLLOC_CONFIRM 00000053 A state check occurred. This can occur if tppc_deallocate with DEALLOCATE_TYPE_CONFIRM or tppc_activate_on_confirmation with AOC_DEALLOC is called when the conversation is not in send state or while in the middle of sending a logical record.
LU62RC_SKDLLOC_ABEND 00000056 A state check occurred. tppc_deallocate was called with DEALLOCATE_TYPE_ABEND, but the conversation is in end-conversation state.
LU62RC_SKDLLOC_LOCAL 00000057 A state check occurred. tppc_deallocate was called with DEALLOCATE_TYPE_CONFIRM, but the conversation is not in end-conversation state.
LU62RC_SKFLUSH_BADSTATE 00000061 A state check occurred. tppc_flush was called, but the conversation is not in send state.
LU62RC_SKPOSTR_BADSTATE 00000092 A state check occurred. tppc_post_on_receipt was called, but the conversation is not in receive state.
LU62RC_PKPTRCV_INVTYPE 000000A1 A parameter check was detected. tppc_activate_on_confirmation with AOC_P_T_R or tppc_prepare_to_receive with PREP_TO_RECEIVE_TYPE_CONFIRM was requested on a conversation allocated with ALLOCATE_SYNC_NONE.
LU62RC_SKPTRCV_BADSTATE 000000A3 A state check occurred. This can occur if tppc_prepare_to_receive is called when the conversation is not in send state or while in the middle of sending a logical record.
LU62RC_SKRECEV_BADSTATE 000000B1 A state check occurred. This can occur if tppc_receive or tppc_activate_on_receipt is called when the conversation is not in send state or receive state, or while in the middle of sending a logical record.
LU62RC_SKRTSND_BADSTATE 000000E1 A state check occurred. tppc_request_to_send was called, but the conversation is not in send, receive, received-confirm, received-confirm-send, or received-confirm-deallocate state.
LU62RC_PKSENDD_BADLL 000000F1 A parameter check was detected. This can occur if a tppc_send_data is called without a data message block, with an invalid logical length, or if there is bad file chaining in the data block.
LU62RC_PK_BAD_PROG 000000F2 A parameter check was detected. A tppc_activate_on_confirmation or tppc_activate_on_receipt function was called, but the program specified on the pgm parameter is not defined in the TPNT.
LU62RC_SKSENDD_BADSTATE 000000F2 A state check occurred. tppc_send_data was called, but the conversation is not in send state.
LU62RC_INVALID_MODE_NAME 000000F3 An invalid mode name has been passed on the tppc_allocate call. This error occurs when the mode name specified is SNASVCMG. This mode name is reserved for CNOS (change number of sessions) processing.
LU62RC_PK_BAD_PARM 000000F3 A parameter check was detected. A tppc_activate_on_confirmation or tppc_activate_on_receipt function was called, but there is no block on the data level specified by the level parameter.
LU62RC_SKSENDE_BADSTATE 00000111 A state check occurred. tppc_send_error was called, but the conversation is in an invalid state.
LU62RC_NOT_RCV_STATE 00000122 A state check occurred. This can occur if tppc_test with test=TEST_TEST_POSTED or tppc_wait is called, but the conversation is not in receive state. This error also occurs when tppc_test with test=TEST_TEST_RTSRCVD is called while the conversation is not in either send or receive state.
LU62RC_PK_BAD_OPTION 00C62074 An invalid parameter option was passed to a TPF/APPC C runtime library function. An OPR-C62074 dump is issued. Control returns immediately to the calling function.
LU62RC_TP_NOT_AVAIL_RETRY 084B6031 An allocation error occurred. The transaction program could not be started. One possible cause is the lack of resources. This is a temporary condition; retry the request.
LU62RC_TP_NOT_AVAIL_NO_RETRY 084C0000 An allocation error occurred. The transaction program could not be started. One possible cause is the lack of resources. This is a permanent condition; do not retry the request.
LU62RC_TPN_NOT_RECOGNIZED 10086021 An allocation error occurred. The transaction program name specified on the tppc_allocate call was not recognized by the remote LU.
LU62RC_PIP_NOT_SPECIFIED_ CORRECTLY 10086032 An allocation error occurred. The remote LU rejected the allocation request because the PIP parameter specified did not agree with the PIP value defined by the remote program.
LU62RC_CONV_TYPE_MISMATCH 10086034 An allocation error occurred. This error indicates that the remote LU rejected the allocation request because the remote transaction program does not support the conversation type requested.
LU62RC_SYNLVL_NOTSUPORT 10086041 An allocation error occurred. tppc_allocate was called with a value for the sync argument that the remote LU does not support.