Wait For 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
15.10
Language
English (United States)
Last Update
2018-10-07
dita:id
B035-2417
lifecycle
previous
Product Category
Teradata Tools and Utilities

Wait For Response is a one byte field that specifies whether DBCHCL is to retain control or return control to the application in two situations:

  • When the application has called DBCHCL for some function and DBCHCL cannot send that request to the Teradata Database because another request in the same session is active, DBCHCL is unable to initiate that function.
  • When the application has called DBCHCL for the fetch function and DBCHCL cannot provide access to a parcel or buffer (depending on the setting of Parcel Mode Fetch) because the buffer is being restocked, DBCHCL is unable to complete the fetch function.
  •  

    In this language...

    The variable name for Wait For Response is...

    COBOL

    DBCAREA‑WAIT‑FOR‑RESP

    PL/I

    WAIT_FOR_RESP

    C

    wait_for_resp

    IBM Assembler

    DBOBSYW

     

    This routine...

    Does this for Wait For Response...

    DBCHINI

    writes

    DBCHCL

    reads (CON; RSUP; CMD; IWPF; IRQ; CRQ)

     

    Wait For Response is used by...

    To...

    applications

    write

    Wait For Response is initialized by DBCHINI to the default value provided for Wait For Response in the HSHSPB.

    When the value for Wait For Response is not appropriate for the application, you should perform the following procedure before calling DBCHCL.

    1 Set Change Options to 'Y'.

    2 Change the value for Wait For Response as follows.

     

    If DBCHCL is...

    Then change the value for Wait For Response to...

    not to return control until it is able to initiate or complete

    Y

    to return control as soon as the function‘s request has been sent to the Teradata Database, in which case the application must use some other method to detect when the function‘s response arrives

    N

    Use mnemonics for the codes. Mnemonics are provided in the language definition file for the DBCAREA.

    If Wait For Response is set to N, and one of the two situations described earlier occurs, the return code is set to 150.

    The application may try again. There are two ways to decide when it is reasonable to perform a retry.

  • Call DBCHWAT.
  • When control is returned from DBCHWAT, try again. This method ties up fewer system resources while waiting.

    Several tries may be necessary.

    Occasionally CLIv2 may finish one operation and start another immediately.

    In that case, DBCHWAT will return control when one operation is over, but the next call by the application to DBCHCL will not be accepted because CLIv2 has already started another operation.

    Allow for the possibility of multiple tries.

  • Try again immediately and keep trying until the call is accepted.
  • If you use this method, there should be a time delay coded between fetch attempts.

    Note: If one of the two situations above occurs and Wait For Response is set to N, the original call to DBCHCL was not accepted. CLIv2 is reporting “I was not able to do that; try again later.”

    Wait For Response set to 'Y' is incompatible with the use of a master ECB and will result in an error return code.

    Note: Neither the Abort function nor the Disconnect function is affected by the setting of Wait For Response.