Put Attribute - Access Module

Teradata® Tools and Utilities Access Module Programmer Guide

Access Module
Release Number
June 2022
English (United States)
Last Update
Product Category
Teradata Tools and Utilities

The Put Attribute function provides an arbitrary data value to an Access Module. The structure follows:

typedef struct _pmiAttribute                                           
  char      EyeCatcher[pmiMAX_EC_LEN];   /* Struct eyecatcher string */
  pmUInt32  StructLength;                /* Length of this structure */
  void     *ObjData;            /* Object pointer (PIData or FIData) */
  pmUInt32  AttrNameLen;                 /* Length of attribute name */
  char      AttrName[pmiMAX_ATR_NAME_LEN];         /* Attribute name */
  pmUInt32  AttrValueLen;               /* Length of attribute value */
  char      AttrValue[pmiMAX_ATR_VAL_LEN];        /* Attribute value */
} pmiAttr_t;                                                           

where the following is true:

Parameter Field Description
EyeCatcher input Structure description string, such as pmPutAParms.
StructLength input Total structure length, including the EyeCatcher string.
ObjData input Pointer to one of two forms of data.
The type of data depends on the value of Reqtype, as follows:
  • pmiPIDMOptPutA_AObjData is a value provided by an Access Module in response to a previous Access Module initialization request call (as in PIData fields, noted earlier).
  • pmiPIDMOptPutF_AObjData is a value provided by an Access Module in response to a previous Access Module open request call (as in FIData fields, noted earlier).
AttrNameLen input Length of the AttrName field.
AttrName input Name of the attribute.
AttrValueLen input Length of the AttrValue field.
AttrValue input Value of the attribute.

Return Codes

The following Put Attribute return code supplements those listed in Typical Interface Return Codes.

Return Code Description
pmrcBadAttrName The AttrName is not recognized.

Usage Notes

Consider the following when specifying Put Attribute parameters:
  • Requirements – A Put Attribute function is required when the Reqtype field of the pmiCmdBlock_t structure is pmiPIDMOptPutA_A or pmiPIDMOptPutF_A.
  • Communication – The Put Attribute function facilitates communication from a client utility to an Access Module. It might be used, for example, to send the name of the currently active database table to the Access Module.
  • Character Sets – Session character set is passed by pmAPutAttr()from the client utility to the Access Module for possible use. The attribute value is a variable-length character string with either the character set name or the character representation of the character set ID. The attribute varies based on how you specify the character set:
    • If specified by name, the attribute name is CHARSET_NAME.
    • If specified by ID, the attribute name is CHARSET_NUMBER.