15.10 - Rules for Indicator Variables - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

Preprocessor2 for Embedded SQL
Programming Reference

Number Contained in Indicator Variable

Specification to the Application

A negative number (most commonly ‑1)

The associated input main variable should be treated as a null. Alternatively, it means the Teradata Database returned a null for the associated column.


The associated input main variable is non-null or that a non-null value was successfully returned with no exception conditions applied.

A positive number

Truncation has occurred when returning a character or byte string to the associated main variable. This value represents the original length of the string before truncation.

An indicator variable is defined as a two byte integer (smallint). In PL/I, this is declared as:

DCL  identifier  FIXED BIN[ARY][(n)];

With this declaration, integer n must be positive, such that 1 <= n <= 15. If n is not specified, a default of 15 is used.