16.20 - DBCHCL CRQ Function - Teradata Tools and Utilities

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

prodname
Teradata Tools and Utilities
vrm_release
16.20
created_date
September 2019
category
Programming Reference
featnum
B035-2417-108K

Purpose

CRQ (Continue Request) sends data requested by the Teradata Database to complete an SQL request. The need for such completion must be indicated by one of the following SQL requests:
  • A USING row descriptor that specifies CLOB or BLOB AS DEFERRED. The result is one of the following:
    • An ElicitData parcel in the response that contains the token specified as the Using-data for the AS DEFERRED field.
    • An ElicitDataByName parcel in the response which contains the name specified in the BY NAME phrase.
  • A CREATE or REPLACE for an executable item, such as FUNCTION, that specifies the EXTERNAL NAME clause. The result is an ElicitFile parcel that contains the filename specified by the EXTERNAL clause.

When either parcel is received, the application then sends data to complete the SQL request using the ContinueRequest function.

Usage Notes

The application should call the CRQ function after processing an ElicitData or ElicitFile response parcel. If return Code is zero, the application must invoke the FET function to process the response. If more data exists, these steps are repeated as many times as necessary.

DBCAREA Input Fields

Before using the Continue Request 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 Continue Request Function
Continued-data Function
Input-CLIv2-connection-number Input-CLIv2-request-number
Request-length Request-pointer

When processing an ElicitData parcel, the Request-pointer addresses data for the Large Object (LOB). The LOB begins with an 8-byte unsigned integer that contains the length, in bytes, of the data. If the length is not known when the start of the LOB is sent, the length field might be zero.

When processing an executable item, the Request-pointer addresses its statements, which do not begin with a length field.

DBCAREA Input Fields Optional for the Continue Request Function
Change-options C2S-conversion
Fetch Buffer Length Locate-mode
Maximum-parcel Message-area-length
Message-area-pointer  

DBCAREA Output Fields

Upon completion of the Continue Request 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 Continue Request Function
Message-length Message-return-code
Message-return-code Message-text
Message-text-length Message-return-code
Return Code  
DBCAREA Output Fields set by Successful Continue Request Functions
Current-request-buffer-length Current-response-buffer-length