DBCHCL FET Function - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Product
Teradata Tools and Utilities
Release Number
16.20
Published
September 2019
Language
English (United States)
Last Update
2019-10-12
dita:mapPath
dsu1527114222346.ditamap
dita:ditavalPath
dsu1527114222346.ditaval
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

Purpose

FET (Fetch) delivers a pointer to the next parcel of the response.

Usage Notes

  • If Return Code is 0, the application may process the response from the Teradata Database. FET may be invoked repeatedly until the entire response has been processed.
  • For Two-phase commit sessions, Fetch ensures that the current session is aborted at syncpoint if a failure parcel is received in response to a request.
  • In addition, the first FET after a CON call will return the following fields:
    • Output-TDP-path
    • Output-TDP-session-number
    • Output-host-id

DBCAREA Input Fields

Before using the Fetch function, the application must set the DBCAREA fields in the first table and may optionally set those in the second table depending on the application's requirements.

DBCAREA Input Fields Required for the Fetch Function
Function Input-CLIv2-connection-number
Input-CLIv2-request-number  
DBCAREA Input Fields Optional for the Fetch Function
Fetch-data-pointer Fetch-maximum-data-length
Message-area-length Message-area-pointer
Positioning-action Positioning-statement-number
Positioning-value Row-count

DBCAREA Output Fields

Upon completion of the Fetch function, CLIv2 will always set DBCAREA fields in the first table and will set those in the second table if the function was successful.

DBCAREA Output Fields always set by the Fetch Function
Current Response Return Code
Session-status Message-length
Message-return-code Message-text
DBCAREA Output Fields set by Successful Fetch Functions
Buffer Length Data Length
Fetch-data-pointer Fetch-parcel-flavor
Fetch Returned Message-text-length
Output TDP Output-host-id
TDP-receipt-timestamp Time1
Time1-status Time2
Time2-status Time3
Time3-status Time4
Time4-status Time5
Time5-status