gtpc2marC/C++ Language Support User's Guide

cmcfm-Send a Confirmation Request

This function sends a confirmation request to the remote transaction program and waits for the confirmation reply. This allows the 2 programs to synchronize their processing.

Format

#include   <tpfmap.h>
void       cmcfm(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 the REQUEST_TO_SEND_RECEIVED indication is placed. The REQUEST_TO_SEND_RECEIVED indication is one of the following:

CM_REQ_TO_SEND_RECEIVED
This value indicates that a REQUEST_TO_SEND indication was received from the remote transaction program. This is a request that the local TPF transaction program enter receive state, so the remote program can 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 cmcfm function. A complete list of the return codes and their definitions can be found in Table 45.

Programming Considerations

Examples

The following example sends a confirmation request to the remote transaction program and waits for the confirmation reply.

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

Related Information