gtpc2mb6C/C++ Language Support User's Guide

cmserr-Send Error Notification

This function informs the remote transaction program that the local TPF transaction program detected an error.

Format

#include   <tpfmap.h>
void       cmserr(unsigned char *conversation_ID,
                  signed int *request_to_send_received,
                  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.

request_to_send_received
This is a pointer to a 4-byte field where a REQUEST_TO_SEND notification is placed. Possible values are:

CM_REQ_TO_SEND_RECEIVED
This value indicates that the local program received a REQUEST_TO_SEND notification from the remote program. This is a request that the local program enter receive state, which allows the remote program to enter send state.

CM_REQ_TO_SEND_NOT_RECEIVED
This value indicates that a REQUEST_TO_SEND notification was not received.

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 cmserr function. A complete list of the return codes and their definitions can be found in Table 45.

When the conversation is in send state, the possible return codes are:

When the conversation is in receive state, the possible return codes are:

When the conversation is in send-pending state, the possible return codes are:

When the conversation is in confirm, confirm-send, or confirm-deallocate state, possible return codes are:

If the conversation is not in one of the states listed previously, the only possible return codes are:

Programming Considerations

Examples

The following example informs the remote transaction program that the local TPF transaction program detected an error.

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

Related Information