Get 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 Get Attribute function retrieves an arbitrary data value from 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 pmGetAParms.
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:
  • pmiPIDMOptGetA_AObjData is a value provided by an Access Module in response to a previous initialization request call (as in PIData fields, noted earlier).
  • pmiPIDMOptGetF_AObjData is a value provided by an Access Module in response to a previous open request call (as in FIData fields, noted earlier).
AttrNameLen input Length of the AttrName field.
AttrName input Name of the attribute.
AttrValueLen output Length of the AttrValue field.
AttrValue output Value of the attribute.

Return Codes

The following Get 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 Get Attribute parameters:
  • Requirements – A Get Attribute function is required when the Reqtype field of the pmiCmdBlock_t structure is pmiPIDMOptGetA_A or pmiPIDMOptGetF_A.
  • Communication – The Get Attribute function facilitates communication to the client utility from the Access Module. It might be used, for example, to send a physical volume identification to the client utility.