16.20 - FNC_TblOpGetFormat - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
April 2020
Content Type
Programming Reference
Publication ID
English (United States)


Returns the default format or the format set in the contract function by a previous call to FNC_TblOpSetFormat.


FNC_TblOpGetFormat(char                  *attribute,
                   int                    streamno,
                   Stream_Direction_en    direction,
                   void                  *outValue,
                   int                    outSize);
char *attribute
the format attribute to be retrieved. Currently, the only possible value is "RECFMT".
int streamno
the stream number.
Stream_Direction_en direction
the stream direction: 'R' or 'W'.
void *outValue
the buffer where the format attribute value is returned.
int outSize
the size in bytes of the outValue buffer.

Usage Notes

Format attribute "RECFMT" defines the input/output record format and has the following two possible values:

typedef enum
    INDICFMT1 = 1,        /* IndicData with row separator sentinels */
    INDICBUFFMT1 = 2      /* IndicData with NO row or partition separator sentinels */
} Stream_Fmt_en;

When format attribute is "RECFMT", buffer outvalue should be of size sizeof(Stream_Fmt_en) and the attribute value returned would be INDICFMT1 (IndicData with row separator sentinels) or INDICBUFFMT1 (IndicData with no row or partition separator sentinels). Memory must be allocated for buffer outvalue before FNC_TblOpGetFormat is called and released after the buffer is no longer needed.