Read Global Variable - Parallel Transporter

Teradata® Parallel Transporter Operator Programmer Guide

Product
Parallel Transporter
Release Number
17.10
Published
June 2021
Language
English (United States)
Last Update
2021-07-01
dita:mapPath
igj1608578346674.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2435
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

Read Global Variable is the service function that retrieves the value of a global variable.

Structure

#include <pxoper.h>
PXSTC_Code PX_ReadGlobalVar(PX_OperatorHandle  operator,
   PX_Name  varName,
   PX_Count  itemIndex,
   PX_Addr *  itemBufferAddr,
   PC_Length *  itemBufferSize);

where the following is true:

Parameter Function Specification
itemBufferAddr output Pointer to the address of the buffer where the value of the global variable is stored.
itemBufferSize output Pointer to the size of the item buffer.
itemIndex input Item of the global variable to be retrieved.

The itemIndex parameter can range from 1 to the maximum limit specified when the global variable was created.

operator input Operator handle by which the global variable is to be read.
varName input Name of the global variable.

Return Codes

The following Read Global Variable 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_Success A successful read access of the global variable.

Usage Notes

Consider the following when defining the Read Global Variable function.

Topic Usage Notes
Status If the function status is PXSTC_Success, then:
  • The value of the global variable is stored in the location pointed to by the itemBufferAddr parameter
  • The length of the global variable value is indicated by the itemBufferSize pointer
See Also