Rewinding to the Beginning of a Response - Call-Level Interface Version 2

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

Product
Call-Level Interface Version 2
Release Number
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-05-07
dita:mapPath
jen1488824663137.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

The response for a request may be reprocessed from the beginning if an application requires. The ability to rewind to the start of the response sequence is dependent on the setting of the Keep-response option when the request is initiated.

Keep-response Result
N The response is discarded as it is processed and rewind is unavailable.
Y The application has the option of rewinding to the beginning of the response and reprocessing.

To rewind to the start of the response after the session has been established, an application must performs the following steps:

  1. Modify the DBCAREA.
    1. Set the Function to Rewind.
    2. Set the Input CLIv2 Session Id used to initiate the request.
    3. Set the Input-CLIv2-request-number to the Output-CLIv2-request-number obtained when the request was initiated.
    4. Optionally set the following:

      Message-area-pointer

      Message-area-length

  2. Call DBCHCL to perform the Rewind function.
  3. Check the return code from DBCHCL:
    Return Code Results
    0 Call DBCHCL to perform a Fetch function (see Fetching the Response for a Request) to get the final status of the rewind and the first part of the response.
    anything else Process the return code and DBCAREA message.