FNC_TblOpGetFormat Function | C Library Functions | Teradata Vantage - FNC_TblOpGetFormat - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantageā„¢

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.