gtpc2mazC/C++ Language Support User's Guide

cminit-Initialize a Conversation

This function allocates local resources for a conversation and initializes various characteristics before the ALLOCATE is done. The remote partner uses the cmaccp function (ACCEPT_CONVERSATION) to initialize the conversation on its end.

Format

#include   <tpfmap.h>
void       cminit (unsigned char *conversation_ID,
                   unsigned char *sym_dest_name,
                   signed int *return_code);

conversation_ID
This is a pointer to an 8-byte character array where the conversation ID is returned. You must specify this conversation ID on all subsequent functions for this conversation.

sym_dest_name
This is a pointer to an 8-character string, which specifies the symbolic destination name. This symbolic name is used to determine the remote transaction program name, partner LU name, and mode name for the session that is to carry the conversation. The side information table is searched for the symbolic name and the following characteristics are set from the entry:

If the symbolic name is less than 8 characters, it is left-justified and padded to the right with blanks. If the string contains all blanks, the side information table is not searched and the characteristics listed previously are not set. In this case, the program is expected to set the characteristics with the set functions before doing the cmallc function.

Note:
See the TPF ACF/SNA Data Communications Reference for more information about the side information table. See TPF Operations for more information about the ZNSID command.

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

Programming Considerations

Examples

The following example initializes a conversation.

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

Related Information