DBFIRQ
DBFIRQ is the Initiate Request function of DBCHCL; DBFIRQ sends a request to the Teradata Database to be processed.
How It Works
DBFRIRQ performs the following functions:
Initiating a Request
The sequence of operations for initiating a request is:
1 Call DBCHCL for DBFIRQ
2 Check that return code is zero
A return code of zero does not imply that the Teradata SQL request was successful. It implies that the Teradata SQL request has been sent in to the Teradata Database. That is, that the initial status is successful. If the request is successful on the client, the Teradata Database processes it and sends the first portion (buffer-full) of the Teradata SQL response to the client.
Successful Request/Response Operation
The sequence of operations required for a successful request/response operation is:
1 Call DBCHCL for DBFIRQ
2 Check that return code is zero
Note: See “DBFFET” on page 212 for steps to take until response is “consumed” or no longer required. If rewind is required, see “DBFREW” on page 214 and then “DBFFET” on page 212.
3 Call DBCHCL for DBFERQ
4 Check that return code is zero
If DBCHCL is called for DBFIRQ without having first called DBCHCL for DBFCON, DBCHCL returns with a return code, “first do a connect” (NOSESSION; 304).
It is the application program’s responsibility to provide Using Data Pointer and Using Data Length if the Teradata SQL request contains a USING modifier. CLI does not parse the Teradata SQL request, so it cannot coordinate the USING modifier and the using data. Similarly, it is the application program’s responsibility to set Using Data Length to zero if the Teradata SQL request does not contain a USING modifier.
If the call to DBCHCL for DBFIRQ results in a non-zero return code, the Initiate Request has failed for the reason indicated by the value of the return code. CLI internal structures for the non-existing request can (and should) be de-allocated by calling DBCHCL for the DBFERQ. The Output Request Id from DBFIRQ is the appropriate value to place in Input Request Id for the DBFERQ.
Interface
Function: |
DBFIRQ - Initiate ReQuest |
Purpose: |
Initiate a request |
Parms: |
|
DBCAREA Parameters
The following fields in the DBCAREA may be read or written to by DBCHCL’s DBFIRQ, depending on the application program’s environment.