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

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

Syntax

int
FNC_TblOpWrite(FNC_TblOpHandle_t *handle);
FNC_TblOpHandle_t *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.

Return Value

An integer that indicates TBLOP_SUCCESS, TBLOP_NOROW, TBLOP_ABORT, or TBLOP_ERROR.

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 Topics

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