The following information applies if the application has chosen double buffering when initiating the request, and is now choosing to see the response without rewinding.
- Supplies the session id and request id of the response required sets the function code to DBFFET
- Supplies the length of and a pointer to a response area, if the request was submitted with the Move Mode processing option
- Calls DBCHCL
DBCHCL first determines whether to use the DBCAREA or the RCB for the specified request when testing options by testing the set options flag of the DBCAREA. If it is Y, the DBCAREA options are used; otherwise, the RCB options are used. If the current response buffer has been consumed and the EndRequest parcel has not been received, MTDP is called with the request and session identifiers, the MTDPRET function, and the waitdata options set according to the waitdata options flag value of the selected options area.
MTDP checks if the specified request has completed, and, if it has not completed and the waitdata option is set, waits until the response message for the prior request arrives or an error occurs, then returns control to DBCHCL.
If MTDP fails either because of a fault or because the wait data option was not set, DBCHCL returns an error message to the application. Otherwise, the active response buffer becomes the current buffer, and, if the current buffer does not contain an EndRequest parcel, the previously current buffer becomes the active buffer and MTDP is called with the session and request identifier fields of the MTDPCB set as before and the function field set to MTDPCONT.
MTDP sends a Continue Request message to the database and returns to DBCHCL.
If MTDP returns unsuccessfully, an error message is returned to the application. DBCHCL makes the next unit of response available to the application program using the method chosen by the application when the request was initiated, and returns control to the application program.
If the return code in the DBCAREA is not normal, the application makes the appropriate changes, and re-submits the MTDP Control Block to DBCHCL, as above. Otherwise, it consumes the unit of response. Typically, the application loops back for another unit of response until the EndRequest parcel is obtained.