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.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Purpose

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);
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.