DBFERQ is the End Request function of DBCHCL.
DBFERQ is used to explicitly close a request, discard its response, and de-allocate internal data structures related to the request.
How It Works
- If the application has requested option updates, performs option set/validation logic
- If not Keep Response, and the EndRequest has been received, continues
- If Keep Response, or if the EndRequest parcel has not been received, sends a Continue Request message containing a Cancel parcel
- If the session is active, awaits completion
- Sends a Continue Request message containing a Cancel parcel and awaits completion
- Destroys request context
Successful End Request Operation
- Call DBCHCL for DBFERQ
- Check for return code of zero
DBFERQ applies to requests generated by calling DBCHCL for the DBFCON, DBFRSUP, and DBFIRQs.
DBFERQ ensures that the Teradata SQL request’s response is discarded, thus freeing space on the database computer, and de-allocates CLI internal buffers (thus freeing space on the client).
These space-saving operations make it valuable to call DBCHCL for the DBFERQ as soon as the response is no longer required by the application program. In fact, it is still valuable (especially on IBM PC clients) to call DBCHCL for the DBFERQ even if the request was submitted with Keep Response set to 'N' and the response was consumed or discarded by the database.
DBCHCL always de-allocates the response buffer.
DBCHCL does not use the Open Requests field.
Values Read and Used, But Not Stored
The values for Wait Across Crash, Tell About Crash, Return Time, and Wait For Response are read and used, but not stored.
Interface
Function: | DBFERQ - End Request |
Purpose: | Terminate/cleanup specified request |
Parms: |