gtpc2maoC/C++ Language Support User's Guide

Return Codes for Mapped Conversation Functions

Each TPF/APPC mapped function returns a 4-byte return code. Table 45 contains a list of all the return codes and their definitions. Not all return codes are possible for every function. The individual TPF/APPC mapped function descriptions document valid return codes for that function. The symbolic names of the return code values are defined in the tpfmap.h include file.


Table 45. TPF/APPC Mapped Conversation Return Codes

Symbolic name Meaning
CM_ALLOCATE_FAILURE_NO_RETRY The conversation cannot be allocated on a session and the problem is not temporary. Do not retry the ALLOCATE.
CM_ALLOCATE_FAILURE_RETRY The conversation cannot be allocated on a session but the problem may be temporary. Retry the ALLOCATE.
CM_CONVERSATION_TYPE_MISMATCH This indicates that the remote LU rejected the allocation request because the remote transaction program does not support mapped conversations. The conversation is terminated.
CM_DEALLOCATED_ABEND This can occur if the remote program calls cmdeal with deallocate_type set to CM_DEALLOCATE_ABEND. Or, if the remote program ends abnormally, the remote LU calls cmdeal with deallocate_type set to CM_DEALLOCATE_ABEND. The conversation is terminated. If the remote program was in receive state, some of the information sent by the local program may have been purged.
CM_DEALLOCATED_NORMAL This occurs when the remote program calls cmdeal with:
  • deallocate_type set to CM_DEALLOCATE_FLUSH
  • deallocate_type set to CM_DEALLOCATE_SYNC_LEVEL and sync_level was CM_NONE.
The conversation is terminated.
CM_OK The function completed successfully.
CM_PARAMETER_ERROR One of the parameters on the function or one of the associated characteristics contained invalid information. The source of the error is considered to be outside the control of the local program; for example, in the side information table. The conversation's state remains the same. Compare this with CM_PROGRAM_PARAMETER_CHECK.
CM_PRODUCT_SPECIFIC_ERROR This indicates that an error occurred during TPF's internal processing of the function. The conversation is terminated.
CM_PROGRAM_ERROR_NO_TRUNC This indicates that the remote program called cmserr while in send or send-pending (with error_direction set to CM_SEND_ERROR) state. No truncation occurred. The local program remains in receive state.
CM_PROGRAM_ERROR_PURGING This indicates that the remote program called cmserr while in receive, send-pending (with error_direction set to CM_RECEIVE_ERROR), confirm, confirm-send, or confirm-deallocate state. If the remote program was in receive state but did not receive all the information sent by the local program, data may be purged at the local LU, remote LU, or both. The local program is placed in receive state.
CM_PROGRAM_PARAMETER_CHECK One of the parameters on the function or one of the associated characteristics contained invalid information. The source of the error is considered to be under the control of the local program. No other returned variable contains valid information. The conversation's state is unchanged. Compare this with CM_PARAMETER_ERROR.
CM_PROGRAM_STATE_CHECK This indicates that a local program called a function while in a state that does not allow that function. No other returned variables contain valid information. The conversation's state is unchanged.
CM_RESOURCE_FAILURE_NO_RETRY The conversation was prematurely terminated because of some failure. The condition is not temporary; do not retry the transaction. The conversation is terminated.
CM_RESOURCE_FAILURE_RETRY The conversation was prematurely terminated because of some failure. The condition may be temporary; retry the transaction. The conversation is terminated.
CM_SVC_ERROR_NO_TRUNC This return code is possible only when the remote transaction program is using an LU 6.2 interface other than this one. The remote program issued a SEND_ERROR with type=SVC, the remote program was in send state, and the function did not truncate a logical record. This places the local program in receive state.
CM_SVC_ERROR_PURGING This return code is possible only when the remote transaction program is using an LU 6.2 interface other than this one. The remote program issued a SEND_ERROR with type=SVC while it was in receive or confirm state and information was purged. The local program enters receive state.
CM_SVC_ERROR_TRUNC This return code is possible only when the remote transaction program is using an LU 6.2 interface other than this one. The remote program issued a SEND_ERROR with type=SVC, the remote program was in send state, and the function truncated a logical record. This places the local program in receive state.
CM_SYNC_LVL_NOT_SUPPORTED_PGM The remote LU rejected the allocation request because the local program specified a synchronization level the remote program does not support. The conversation is terminated.
CM_TPN_NOT_RECOGNIZED The remote LU rejected the allocation request because it did not recognize the requested remote transaction program. The conversation is terminated.
CM_TP_NOT_AVAILABLE_NO_RETRY The remote LU rejected the allocation request because it was unable to start the requested remote transaction program. The condition is not temporary; do not retry the allocation request. The conversation is terminated.
CM_TP_NOT_AVAILABLE_RETRY The remote LU rejected the allocation request because it was unable to start the requested remote transaction program. The condition may be temporary; retry the allocation request. The conversation is terminated.
CM_UNSUCCESSFUL The function issued by the local program did not execute successfully. The state of the conversation remains unchanged.