gtpc2mbdC/C++ Language Support User's Guide

cmstpn-Set the TP_Name Characteristic

This function sets the TP_name and TP_name_length characteristics. It overrides the default value set by the cminit function.

Format

#include   <tpfmap.h>
void       cmstpn(unsigned char *conversation_ID,
                  unsigned char *TP_name,
                  signed int *TP_name_length,
                  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) that started this conversation.

TP_name
This is a pointer to a string of as many as 64 characters. This string specifies the remote transaction program to be contacted when the ALLOCATE is executed.

TP_name_length
This is a pointer to a 4-byte field that contains the length of the new transaction program name. The value can be from 1-bytes.

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 cmstpn 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 TP_name and TP_name_length characteristics.

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

Related Information