17.10 - Example Using FNC_GetLobLength_CL - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)
BYTE               *value;
int                locatorLength;
FNC_LobLength      lobLength;
FNC_TblOpHandle_t  *Handle;
int                i;               // column index
int                null_ind;
....

// read locator
FNC_TblOpGetAttributeByNdx(Handle, i, (void **) &value, &null_ind, &locatorLength);
if (null_ind != -1)
   // get LOB length
   lobLength = FNC_GetLobLength_CL(value);