gtpc2mb3C/C++ Language Support User's Guide

cmsdt-Set the Deallocate_Type Characteristic

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

Format

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

deallocate_type
This is a pointer to a 4-byte field that specifies the type of deallocation to be done when the program issues a cmdeal function. Use one of the following values:

CM_DEALLOCATE_SYNC_LEVEL
This value specifies that the sync_level characteristic should be used to determine the type of deallocate. If sync_level is CM_NONE, the function executes a cmflus and then deallocates the conversation normally. If sync_level is CM_CONFIRM, the function executes a cmcfm. If the CONFIRM is successful, the conversation is deallocated normally. If the CONFIRM fails, the return code determines the state of the conversation.

CM_DEALLOCATE_FLUSH
This value specifies to do a cmflus function and then deallocate the conversation normally.

CM_DEALLOCATE_CONFIRM
This value specifies to do a cmcfm function. If the CONFIRM is successful, the conversation is deallocated normally. If the CONFIRM fails, the return code determines the state of the conversation.

CM_DEALLOCATE_ABEND
This value specifies that the conversation should be unconditionally and abnormally deallocated. If the conversation is in send state, the function executes a cmflus. If the conversation is in receive state, data may be purged.

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 cmsdt 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 deallocate_type characteristic.

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

Related Information