FNC_TblOpWrite Function | C Library Functions | Teradata Vantage - FNC_TblOpWrite - 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ā„¢

Allows table operator writers to write rows to spool. The function sets the write context to the next output row.

Returns an integer that indicates TBLOP_SUCCESS, TBLOP_NOROW, TBLOP_ABORT, or TBLOP_ERROR.

Syntax

int
FNC_TblOpWrite(FNC_TblOpHandle_t *handle);

Syntax Elements

handle
a handle associated with an output stream. This should be the handle returned by FNC_TblOpOpen.

For details about the FNC_TblOpHandle_t structure, see Table Operator Data Structures.

Usage Notes

You must call FNC_TblOpOpen first, then pass the handle returned from FNC_TblOpOpen as an argument to FNC_TblOpWrite.

If the stream was opened with the TBLOP_NOOPTIONS option, the row fields can be directly set with function FNC_TblOpBindAttributeByNdx, or directly set assigning:

handle->row->indicators, columnptr[index] and lengths[index].

If you call FNC_TblOpOpen with the options field set to TBLOP_RAWMODE, the raw row can be directly set through the handle structure:

Access handle->row to set the current raw row (length, IndicData format, record body)

Example Using FNC_TblOpWrite

See C Table Operator for an example of how to use this function.

Related Information

For information about the current_row_t structure which stores information about the current row, see Table Operator Data Structures.