17.00 - Read Global Variable - Parallel Transporter

Teradata® Parallel Transporter Operator Programmer Guide

prodname
Parallel Transporter
vrm_release
17.00
created_date
June 2020
category
Programming Reference
featnum
B035-2435-220K

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