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
17.10
Published
June 2021
Language
English (United States)
Last Update
2021-07-01
dita:mapPath
zwv1608578409227.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2417
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 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 returns 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 always sets DBCAREA fields in the first table and sets 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