DBFREW is the rewind function of DBCHCL.
DBFREW sends a reset- pointer request to the database.
How It Works
DBFREW performs the following functions:
- If the session is active, awaits completion
- If Keep response is set to 'N' at the time of submitting the request whose response is to be rewound, then CLI returns 310 error.
- If a Failure or Error parcel is received in response to the request whose response is to be rewound, then CLI returns 310 error.
- If there is a first fetch buffer, positions to the beginning.
- If Keep Response is set and there is no first Fetch buffer, sends a Continue Request message containing a Rewind parcel and return to caller
Requesting a Rewind
The sequence of operations to request a rewind follows:
- If the reset request is successful on the client, the database resets its parcel pointer to the first parcel in the response and sends the first portion of the response to the client.Rewind does not include fetch (DBFFET). The application program must submit a Fetch separately.
- If rewinding may be required, sets Keep Response to 'Y' when the request is submitted.
- If Keep Response is set to 'N', the response may have been discarded by the time a rewind is required. If rewinding is required, sets Keep Response to ‘Y’ or ‘P’ when the request is submitted.
Values Read and Used, But Not Stored
The values of Wait Across Crash, Tell About Crash, Return Time, and Wait For Response are read and used, but not stored.
|Function:||DBFREW - Rewind|
|Purpose:||Reposition to beginning of response|