gtpc2macC/C++ Language Support User's Guide

tppc_get_attributes-Get Information about a Conversation

This function returns information pertaining to a conversation.

Format

#include   <tppc.h>
void       tppc_get_attributes(unsigned int *resid,
                               struct tppc_return_codes *rcode,
                               struct tppc_name *ownname,
                               struct tppc_name *pluname,
                               unsigned char *mode,
                               enum t_get_attributes_sync *sync);

resid
This is a pointer to a 4-byte field that contains the resource ID. This resource ID must be the ID assigned on the initial ALLOCATE for this conversation or one that was assigned by an incoming ATTACH.

rcode
This is a pointer to the structure tppc_return_codes, defined in tppc.h, where the return code is to be placed.

ownname
This is a pointer to the structure tppc_name, defined in tppc.h, where the 16-byte network name of the local TPF LU is returned. The first 8 bytes contain the left-justified network name, which is padded with blanks, or all blanks if the name is unqualified. The second 8 bytes contain the left-justified local LU name, which is padded with blanks.

pluname
This is a pointer to the structure tppc_name, defined in tppc.h, where the 16-byte network name of the partner (remote) LU is returned. The first 8 bytes contain the left-justified network name, which is padded with blanks, or all blanks if the name is unqualified. The second 8 bytes contain the left-justified partner LU name, which is padded with blanks. This returned LU name is the name of the LU where the remote transaction program is located.

mode
This is a pointer to an 8-byte field where the mode name of the conversation is returned.

sync
This is a pointer to a 1-byte field that contains the enumeration type t_get_attributes_sync, where the synchronization level of this conversation is returned. The returned values are:

GET_ATTRIBUTES_SYNC_NONE
This value indicates that no synchronization is allowed on this conversation.

GET_ATTRIBUTES_SYNC_CONFIRM
This value indicates that CONFIRM synchronization is allowed on this conversation.

Note:
The TPF system does not support the SYNCPT level defined by the LU 6.2 architecture.

Return Codes

The following table contains a list of the primary and secondary return codes that can be returned to the program that called the tppc_get_attributes function. A complete list of the return codes and their definitions can be found in Table 37 and Table 38.

Symbolic Name Primary Code Secondary Code
LU62RC_OK 0000  
LU62RC_PARAMETER_CHECK 0001  
  LU62RC_PK_BAD_TCBID .... 00000001
  LU62RC_PK_BAD_CONVID .... 00000002
  LU62RC_PK_BAD_OPTION .... 00C62074
LU62RC_TPF_ABEND FFFF  

Programming Considerations

Examples

The following example retrieves the attributes of a conversation.

#include <tppc.h>
 
      unsigned int                   resource_id;
      struct   tppc_return_codes     return_code;
      struct   tppc_name             own_name;
      struct   tppc_name             plu_name;
      unsigned char                  mode_name[8];
      enum     t_get_attributes_sync sync_level;

  ·
  ·
  ·
/* set up resource_id with the value returned from the allocate verb */
  ·
  ·
  ·
tppc_get_attributes(&resource_id,&return_code,&own_name,&plu_name, \ mode_name,&sync_level); /* normal processing path */
  ·
  ·
  ·

Related Information