Please enable JavaScript to view this site.

ESL Documentation

Field Types

Gets error information when a system error is signalled. This subroutine should be called in a response to the APPC_SystemError event notification.

Note: Do not call APPCGetSystemError for errors signalled by a partner application.

Declaration:

subroutine APPCGetSystemError(integer:CONVERSATION_ID,
                              integer:WORK_REQUEST_ERROR,
                              integer:WORK_REQUEST_IDENTIFIER,
                              integer:APPC_VERB,
                              integer:PRIMARY_ERROR_CODE,
                              integer:SECONDARY_ERROR_CODE )

                     library "eslappc"
 

Arguments:

CONVERSATION_ID is an integer variable containing the conversation identifier (handle) for the APPC conversation returned by either APPCStart or APPCAcceptStart.

WORK_REQUEST_ERROR is an integer variable that receives a number representing the error condition encountered by the work request. The error number can be interrogated using the integer constants listed here. Every call to an ESL APPC subroutine generates one or more low-level work requests internally to ESL APPC Support, representing discrete APPC tasks. For example, these tasks may be "send data" or "receive buffer." The work requests are queued when the subroutine is called, and then serviced when conditions are appropriate for their processing.

APPC_ERR_OUT_OF_MEMORY

Out of memory.

APPC_ERR_INV_TO_ISSUE_CNFRM_REQ

Invalid to call APPCRequestConfirm subroutine or use APPC_Confirm parameter value in APPCSendString, APPCSendDLLData, or APPCEnd subroutines when not using APPC_Confirm value for SYNC_LEVEL on APPCStart.

APPC_ERR_INV_TO_ISSUE_CONFIRMED

Invalid to call APPCSendConfirmed subroutine when APPC_ConfirmRequest event notification not received.

APPC_ERR_CONFIRM_REQ_IGNORED

APPC_ConfirmRequest event notification ignored because conversation not in send state.

APPC_ERR_INV_TO_ISSUE_RECV_NTFY

Invalid to call APPCReceiveNotify subroutine in automatic interface.

APPC_ERR_NO_REMOTE_TP_PARAM

The communications program configuration for remotely attachable TPs did not specify the ESL APPC acceptor profile name in the TP start-up parameters field.

APPC_ERR_BASIC_CONV_NOT_VALID

An APPC TP issued an allocate verb that attempted to start an ESL APPC acceptor program in basic conversation mode. Only mapped conversations are supported.

APPC_ERR_CONV_ENDING_REQ_PURGED

Work request will not be processed because this APPC conversation has received either a normal deallocation from its partner, or a non-recoverable system error has occurred

APPC_ERR_UNEXPECTED_ERROR

Unexpected error encountered.

APPC_ERR_UNEXPECTED_DOS_ERROR

Unexpected operating system error encountered.

APPC_ERROR

Look at values returned in the following  variables:PRIMARY_ERROR_CODE and SECONDARY_ERROR_CODE.

WORK_REQUEST_IDENTIFIER is an integer variable that receives a number representing the ESL APPC work request that was executing when the error was encountered. The number can be interrogated using the integer constants listed here.

APPC_AcceptStart
APPC_ConvertString
APPC_GetInfo
APPC_ReceiveBuffer
APPC_ReceiveNotify
APPC_ReceiveString
APPC_RequestConfirm
APPC_RequestRdyToReceive
APPC_RequestSend
APPC_SendAbend
APPC_SendConfirmed
APPC_SendData
APPC_SendErrorItem
APPC_SendFlush
APPC_SendTerminate
APPC_Start
APPC_TestReqSend

Remarks:

APPC_VERB is an integer variable that receives a number representing the APPC verb reporting the error. The number can be interrogated using the integer constants listed here.

AP_M_ALLOCATE
AP_M_CONFIRM
AP_M_CONFIRMED
AP_M_DEALLOCATE
AP_M_FLUSH
AP_M_GET_ATTRIBUTES
AP_M_PREPARE_TO_RECEIVE
AP_M_RECEIVE_AND_POST
AP_M_RECEIVE_AND_WAIT
AP_M_RECEIVE_IMMEDIATE
AP_M_REQUEST_TO_SEND
AP_M_SEND_DATA
AP_M_SEND_ERROR
AP_M_TEST_RTS
AP_RECEIVE_ALLOCATE
AP_TP_ENDED
AP_TP_STARTED
SV_GET_CP_CONVERT_TABLE

PRIMARY_ERROR_CODE is an integer variable that is set to the primary return code from the APPC verb.

SECONDARY_ERROR_CODE is an integer variable that is set to the secondary return code, if any, associated with the primary code for the APPC verb.

Refer to the Packages APPC Programming Reference Guide for an explanation of the primary and secondary return codes.

Since much of the communications processing occurs asynchronously to the ESL programs, errors may occur after a subroutine call. System errors may be flagged by ESL APPC or by an APPC service error. A system error is reported only after error recovery has failed. This routine is provided to return detailed information so that the user or a communications expert can diagnose the problem. Your ESL program should display or log the error.

Errors:

APPC_NORMAL_COMPLETION

Normal completion.

APPC_ERR_OUT_OF_MEMORY

Out of memory.

APPC_ERR_INV_CONV_ID

Invalid argument: CONVERSATION_ID

APPC_ERR_NO_SYSTEM_ERROR_DATA

APPCGetSystemError was called when no system error data was available.

APPC_ERR_UNEXPECTED_ERROR

Unexpected error encountered.

Example:

response to stimulus APPC_EVENT APPC_SystemError ConvID
   call APPCGetSystemError (ConvID,              # ID from Start/AcceptStart
                            ErrorEncountered,    # Error number
                            WorkRequestNumber,   # Work request in process

                                                        APPCLastVerb,        # APPC Verb reporting error                

                            PrimaryReturnCode,   # integer (6 digit number)

                            SecondaryReturnCode) # integer (8 digit # number)
   if (ErrorEncountered != APPC_NORMAL_COMPLETION) then
 . . .