gtpc2mb4C/C++ Language Support User's Guide

cmsed-Set the Error_Direction Characteristic

This function sets the error_direction characteristic. It overrides the default value set by the cminit or cmaccp function.

Format

#include   <tpfmap.h>
void       cmsed(unsigned char *conversation_ID,
                 signed int *error_direction,
                 signed int *return_code);

conversation_ID
This is a pointer to an 8-byte character array that contains the conversation ID. This conversation ID must be the ID returned by the cminit (INITIALIZE) or cmaccp (ACCEPT_CONVERSATION) that started this conversation.

error_direction
This is a pointer to a 4-byte field that specifies the type of notification the remote program receives after the local program calls cmserr in send-pending state. Use one of the following values:

CM_RECEIVE_ERROR
This value specifies that, if the local program calls cmserr in send-pending state, the remote program is notified of the error by the CM_PROGRAM_ERROR_PURGING return code.

CM_SEND_ERROR
This value specifies that, if the local program calls cmserr in send-pending state, the remote program is notified of the error by the CM_PROGRAM_ERROR_NO_TRUNC return code.

return_code
This is a pointer to a 4-byte field where the return code is to be placed.

Return Codes

The following is a list of return codes that can be returned to the program that called the cmsed function. A complete list of the return codes and their definitions can be found in Table 45.

Programming Considerations

Examples

The following example changes the error_direction characteristic.

#include <tpfmap.h>
 
      unsigned char convid[8];
      signed int    err_dir;
      signed int    rcode;
      .
      .
/* set conversation_ID with value returned from accept or initialize */
      .
      .
cmsed(convid,&err_dir,&rcode);
      .                       /*  normal processing path             */
      .
      .

Related Information