gtpc2matC/C++ Language Support User's Guide

cmdeal-Deallocate a Conversation

This function deallocates the specified conversation from the transaction program. Depending on the value of the deallocate_type and sync_level characteristics, a FLUSH or CONFIRM may be done first. If the DEALLOCATE completes successfully, the conversation no longer exists and the conversation_ID is no longer valid.

Format

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

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

Return Codes

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

When deallocate_type is CM_DEALLOCATE_SYNC_LEVEL and sync_level is CM_NONE, or deallocate_type is CM_DEALLOCATE_FLUSH or CM_DEALLOCATE_ABEND, the possible return codes are:

When deallocate_type is CM_DEALLOCATE_SYNC_LEVEL and sync_level is CM_CONFIRM, or when deallocate_type is CM_DEALLOCATE_CONFIRM, the possible return codes are:

Programming Considerations

Examples

The following example deallocates a specified conversation.

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

Related Information