Purpose
Get Attribute is the service function that retrieves the value of a specific attribute associated with the operator.
Structure
#include <pxoper.h> PXSTC_Code PX_GetAttribute(PX_OperatorHandle operator, PX_AttributeName attributeName, PX_AttributeValue * attributeValue, PX_Length * valueLength);
where the following is true:
| Parameter | Function | Specification |
|---|---|---|
| attributeName | input | Name of the object attribute. |
| attributeValue | output | Retrieved value of the specified attribute. |
| operator | input | Operator handle from which the attribute is to be retrieved. |
| valueLength | output | Length of the retrieved attribute value. |
Return Codes
The following Get Attribute function status codes are defined by the Teradata PT operator interface:
| Status Code | Signifies |
|---|---|
| PXSTC_InvalidArgument | One or more bad input arguments. |
| PXSTC_BadHandle | An undefined object handle. |
| PXSTC_NotFound | The specified attribute was not found in the specified object. |
| PXSTC_Success | Successful access to the specified attribute. |
Usage Notes
Consider the following when defining the Get Attribute function.
| Topic | Usage Notes |
|---|---|
| System Attributes | The following table lists the Teradata PT system attributes that you can retrieve with the Get Attributes function. See also Put Attribute. |
| Status | The following is true, if the function status is PXSTC_Success:
|
| Attribute Name | Data Type | Data Length (in bytes) | Description |
|---|---|---|---|
| SYSTEM_Code | PX_Code | 4 | System ABEND code |
| SYSTEM_FilterHandle | PX_FilterHandle | 4 | Handle of the filter object |
| SYSTEM_GlobalHandle | PX_GlobalHandle | 4 | Handle of the global anchor |
| SYSTEM_InstanceNumber | PX_Number | 4 | Instance number of the operator, starting from 1 |
| SYSTEM_MaxInstances | PX_Count | 4 | Maximum number of instances that can be created for the operator |
| SYSTEM_OperatorName | PX_Addr | 4 | Address of string containing the operator name |
| SYSTEM_OperatorType | PX_Number | 4 | Code indicating type of operator: producer=1, consumer=2, filter=3 |
| SYSTEM_PhaseNumber | PX_Count | 4 | Current processing phase number |
| SYSTEM_UserAreaAddr | PX_Addr | 4 | Address of the user area |