Fetch-returned-data-length - Teradata Tools and Utilities

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

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Tools and Utilities
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2023-11-17
dita:mapPath
oxw1641281447623.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
vfj1470443597526
lifecycle
previous
Product Category
Teradata Tools and Utilities

Fetch-returned-data-length is a four-byte field that specifies the length in bytes of the returned data.

In this language... The variable name for Fetch-returned-data-length is...
COBOL DBCAREA-FET-RET-DATA-LEN
PL/I FET_RET_DATA_LEN
C, C++ fet_ret_data_len
IBM Assembler DBFOFDL
This routine... Does this for Fetch-returned-data-length...
DBCHINI writes
DBCHCL writes (FET)
Fetch-returned-data-length is used by... To...
applications read

After a call to DBCHCL for the fetch function, an application can obtain the length of the returned data. Where the length is provided and what the length refers to depends on the settings in effect when DBCHCL is called for any of the following functions:

  • Connect
  • RunStartUp
  • Initiate Request

The following table shows how the location and meaning of “length” varies depending upon mode settings.

Length of Returned Data 
Locate-mode Parcel-mode-fetch Varying-length-fetch Length of What? Where Length is Provided
Y or N Y N Parcel body Fetch-returned-data-length
Y or N Y Y Parcel body The first two bytes at the address in Fetch-data-pointer
Y N N The grand total of all parcels (headers and bodies) in the response buffer Fetch-returned-data-length
Y N Y Nothing. These settings produce an error.  

DBCHCL places Fetch-returned-data-length, if used, in the DBCAREA when the Fetch function completes. Thus, Fetch-data-pointer is available when an application regains control with a return code of zero from a call to DBCHCL for the Fetch function.