Wait, exit, delay macros

User programs use a Find a File macro (FINDC) to retrieve data stored on the files. However, the data record can be referred to by the user program upon return from the FINDC macro. A WAITC macro is used to guarantee that the input operation has been completed. Only upon return from the WAITC macro can the user program assume that the data record is now in storage and available. The delay for completion of an I/O operation is often substantial when compared to CPU processing speed. Accordingly, following a WAITC macro call, and during the delay pending I/O completion, control can be transferred to another program (or to the current program) for processing of another entry.

The WAITC macro is normally used to ensure completion of an input operation. On output operations (transmit a message or update a data record) the data record is detached from the entry block during calls to the File, Send, or Route macros. Use of the WAITC macro does not ensure completion and the user program cannot determine when output operations are completed. A special mode of operation is provided for the TOUTC macro where a WAITC macro must be called to ensure completion of the output operations. When message processing has been completed, an EXITC macro is called. This program returns all main storage blocks held by this entry to the available storage pools (including the ECB itself), therefore, in that way ending the life of the entry in the system.

Operational programs can defer processing of a low priority task until the activity in the system is sufficiently low to warrant calling it. The Defer (DEFRC) macro is provided for this purpose. The delay prior to service of such entries can be substantial. Accordingly, no records can be held by an entry calling a DEFRC macro and no time-dependent (that is, terminal) response should follow this macro. If the entry is holding considerable working storage, calling of this macro can adversely affect system throughput. The Delay (DLAYC) macro differs from the Defer macro only in that such entries are added to the CPU input list. This list has a higher priority than the CPU defer list.

Note: Defer and Delay macros are normally called by file maintenance or exception routines, and are not recommended for general use.