Error Analysis Under OS/2 

Purpose

CPI-C Trace

You can run an SAP trace while programs communicate via the CPIC interfaces.

You can activate and deactivate the trace via the environment variable:

CPIC_TRACE = [1,2,3]

For each process that the SAPCPIC interface uses, a log file with the name CPxxxxx.TRC is created. xxxxx is the number of the process.

Error Log File

If an error occurs during communication, this error is logged in the file CPxxxxx.ERR with xxxxx = number of the process, in which the error occurred.

Error Messages

If an error occurs during communication, the error is logged. The error messages are output as described in the APPC/LU6.2 guide. In addition, SAP has defined a series of error messages, which are listed below.

These error messages are not CPI-C return codes, and cannot therefore be intercepted in the program.

They simply provide additional information in the trace or error log, which should facilitate error recovery.

SAP_TABLE_NOT_FOUND:

The file SAPCPIC.TBL was not found (CMINIT) or SAPCPIC.TBL cannot be accessed.

SAP_INVALID_DESTINATION:

The specified symbolic destination was not found in SAPCPIC.TBL (CMINIT, CMACCP).

SAP_TOO_FEW_ARGUMENTS:

Not all fields in SAPCPIC.TBL are filled for a particular symbolic destination sind.

SAP_NO_FREE_SIDE_TABLE_SLOT:

An attempt was made to exceed the maximum number of simultaneously active SNA conversations.

SAP_CANT_GET_LOCAL_PGM_NAME:

The attempt to determine the name of the local program failed. The corresponding OS/2 return code is in the error log.

SAP_INVALID_CPIC_CV_ID:

An invalid conversation ID was passed to a SAPCPIC interface function.

SAP_CANT_GET_SIDE_INFO_SEM, SAP_CANT_LOCK_SIDE_INFO_SEM,
SAP_CANT_RELEASE_SIDE_INFO_SEM:

SAP's CPI-C interface works internally with system semaphores. These three errors indicate that either the creation, locking or release of a system semaphore failed. The interface cannot continue to work correctly.

The corresponding OS/2 return code is in the error log.

SAP_CANT_GET_PROCESS_PID:

The attempt to determine the number of a process failed. The corresponding OS/2 return code is in the error log.

SAP_CANT_GET_INFOSEG:

The attempt to get OS/2 system information failed. The corresponding OS/2 return code is in the error log.

SAP_TOO_MANY_CPIC_TBL_ENTRIES:

More connections are defined in SAPCPIC.TBL than the SAPCPIC interface can administer. The current maximum value = 100 connections.

SAP_CANT_GET_SIDE_INFO_SHM, SAP_CANT_GET_DISPLAY_INFO_SHM:

The SAPCPIC interface works internally with shared memory. These two errors indicate that the creation of shared memory areas failed. The interface cannot continue to work correctly. The corresponding OS/2 return code is in the error log.

SAP_NO_FREE_SESSION_AVAILABLE:

All SNA connections defined for a particular symbolic destination are in use, i.e., all SNA sessions have conversations.

SAP_INVALID_LU_NAME:

An invalid local SNA Logical Unit name was entered in SAPCPIC.TBL for a particular symbolic destination.

SAP_INVALID_PLU_NAME:

An invalid local SNA Partner Logical Unit name was entered in SAPCPIC.TBL for a particular symbolic destination.

SAP_INVALID_MODE_NAME:

An invalid SNA mode name name was entered in SAPCPIC.TBL for a particular symbolic destination.