Wait For Response
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:
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.
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.
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.