17.10 - Changing the Value for Wait For Response - Call-Level Interface Version 2

Teradata® Call-Level Interface Version 2 Reference for Workstation-Attached Systems

Product
Call-Level Interface Version 2
Release Number
17.10
Published
October 2021
Last Update
2021-11-02
Content Type
Programming Reference
Publication ID
B035-2418-061K
Language
English (United States)
Last Update
2021-11-02
If the value provided is not appropriate for the application, before calling DBCHCL, the application program may set:
  1. Change Options to 'Y'.
  2. Change the Wait For Response value to the appropriate value:
    • 'Y', if DBCHCL is not to return control until it can initiate or complete.
    • 'N', if DBCHCL is to return control as soon as the function’s request has been sent to the database, in which case the application program must use some other method to detect when the function’s response arrives.

If Wait For Response is set to 'N' and one of the two situations described above occurs, the following return codes are given:

EM_NOTIDLE (208) or EM_NODATA (211),
The application program may try again.
  • The first way to decide when it is reasonable to try again is to call DBCHWAT. When control is returned from DBCHWAT, try again. This method ties up less system resources while waiting.

    Several tries may be necessary. Occasionally CLI may finish one operation it is doing and go on to another immediately. In that case, DBCHWAT will return control when one operation is over, but the application program’s next call to DBCHCL “does not go through” because CLI has already started another operation. Allow for the possibility of multiple tries.

  • The second way to decide when it is reasonable to try again is to try again immediately, and keep trying until “the call gets through.”
  • If one above situations occurs and Wait For Response is set to 'N', the original call to DBCHCL did not “take” at all. CLI is reporting “I was not able to do that; try again later.”
  • Neither the Abort function nor the Disconnect function is affected by the setting of Wait For Response.

The Fetch, Rewind, End Request, and Abort functions read and use the value of Wait For Response, but do not store it.

By using Wait for Response during CLI logoff processing, applications can prevent CLI from waiting “forever” if the gateway does not respond to the logoff request.