WAITF (Wait for Completion of I/O) Macro
The macro ensures that the transfer of a record is complete.
It is valid for DAM and ISAM; but for SAM only with MICR and OCR devices.
The WAITF macro is issued after any READ or WRITE for a file and before the succeeding READ or WRITE for the same file. If the I/O operation is not completed when WAITF is issued, the partition is placed in a wait state until the data transfer is completed. This allows processing of programs in other partitions while waiting for completion. When data transfer is complete, and if no errors were encountered, processing continues with the next sequential instruction. If an error is encountered, control passes to the error-handling routine named in the DTFxx macro.
Format
Requirements for the caller
- AMODE:
- 24
- RMODE:
- 24
- ASC Mode:
- Primary
Parameters
- filename|(r1),filename|(r2),...
- For filename, specify the name you used in the DTFxx macro for
the file from which a record is being read or to which a record is
being written. You can specify this name as a symbol or in register
notation. Multiple file names are valid only when using SAM to read
MICR records.
If you are using the multiple-file-name format of the macro while processing MICR records, and if any of the files have records or errors ready to be processed, control remains in the partition and processing continues with the instruction that follows the WAITF.