Run Task Wait Program (DGADWAIT)
Use the DGADWAIT program as a batch step or a RUN TASK to place a job stream in a wait status for a specified period of time and set return codes indicating when the step or task completes. To synchronize Processes submitted through the batch interface, use DGADWAIT with the MAXDELAY parameter in a SUBMIT command or PROCESS statement. For more information, see Using the MAXDELAY Keyword Parameter to Synchronize Submitted Processes. This program is distributed via SDGASAMP and must be assembled and link-edited to the IBM® Connect:Direct® load library.
The following table describes the positional parameters. If you execute DGADWAIT as a RUN TASK, enclose the parameters in quotes because of the embedded commas, for example, PARM=('1,2').
Parameter | Description |
---|---|
VALUE1 | The first positional parameter indicates the time to wait. The default is 0 or
you can use a comma to omit. For seconds, specify (S)xxxx. The maximum is 9999 seconds or about 2.7 hours. For minutes, specify Mxxx. The maximum is 999 minutes or about 16.6 hours. For hours, specify Hxx. The maximum is H99 or about 4.1 days. You can also specify ‘ABEND' and then use the actual user ABEND code for the second positional parameter. |
VALUE2 | The second positional parameter specifies the return code to set. The default is
0. The maximum is 4095. '-' causes a -1 value (if executed as a batch step, IBM displays the return code value as 4095). |
VALUE3 | The third positional parameter is only used to display diagnostics as WTO (write-to-operator) messages. Specify 'DIAG' or leave blank. Any other value is ignored. |
The following examples show how to use DGADWAIT in a RUN TASK. In the first example, the program waits for one second, and then sets the return code to 2.
|
In this example, the program does not wait, but sets the return code to 8.
|