FNC_TblOpGetFormat Function | C Library Functions | Teradata Vantage - 17.10 - FNC_TblOpGetFormat - 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)

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

Syntax

void
FNC_TblOpGetFormat(char                  *attribute,
                   int                    streamno,
                   Stream_Direction_en    direction,
                   void                  *outValue,
                   int                    outSize);

Syntax Elements

attribute
the format attribute to be retrieved. Currently, the only possible value is "RECFMT".
streamno
the stream number.
direction
the stream direction: 'R' or 'W'.
outValue
the buffer where the format attribute value is returned.
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.