15.10 - Wait For Response - Call-Level Interface Version 2

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

Call-Level Interface Version 2
Programming Reference

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...







    IBM Assembler



    This routine...

    Does this for Wait For Response...




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


    Wait For Response is used by...




    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


    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


    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.