Starting a Conversation

To start a conversation, your user program must first call the Initialize_Conversation (CMINIT) routine with a name that identifies the target program. This name can be one of the following:
  • A symbolic destination name—This is used as an index to a CMS communications directory file that contains information necessary to establish the connection. Note that the CMS communications directory file is called side information by SAA.
  • The actual target transaction program name or resource ID—Note that the CMS communications directory file is still searched for the specified name. Therefore, this name is used as the transaction program name only if it cannot be resolved using the CMS communications directory.

The Initialize_Conversation routine sets various conversation characteristics from the CMS communications directory file (if available) and sets other conversation characteristics to default values.

After initializing a conversation, your program must call the Allocate (CMALLC) routine to request a connection. Before calling Allocate, however, a program can change the conversation characteristics that were set by Initialize_Conversation by calling Set routines. Some of the Set routines allow you to override characteristics that could have been initialized from the CMS communications directory:
  • Mode name
  • TP name
  • Partner LU name
  • Conversation security type
  • Access security user ID
  • Access security password.
Before calling the Allocate (CMALLC) routine, your program must decide how data will be sent on the conversation (specified by conversation_type) and whether synchronization routines will be used in the conversation (specified by sync_level). You can use the Set functions to change the conversation_type characteristic and the sync_level characteristic. Your partner program, after it Accepts (CMACCP) the conversation, can then extract the conversation_type and sync_level characteristics to decide whether it can handle your choice for these characteristics.

The default conversation type is mapped conversations. Mapped conversations allow you to send and receive user data without worrying about APPC logical record formats. However, you can change the conversation type to be a basic conversation. Basic conversations require programs to exchange data in a standardized format.

The default sync_level value is CM_NONE. CM_NONE specifies that the program will not use synchronization routines for the conversation. The sync_level characteristic can be changed to CM_CONFIRM or CM_SYNC_POINT. CM_CONFIRM specifies that the program will perform confirmation processing on the conversation specified. CM_SYNC_POINT specifies that the conversation is to be a protected conversation. This means that Coordinated Resource Recovery (CRR) will coordinate commits (and backouts) of work among multiple protected resources in a distributed application.

For more information on starting a conversation, see Common Programming Interface Communications Reference.