waitc: Wait for outstanding I/O completion
This function suspends processing of an entry until all I/O requests associated with the ECB are complete. Error information is returned, if applicable.
Format
#include <tpf/tpfio.h>
int waitc(void);
Normal return
Integer value of zero.
Error return
Integer value representing the value of CE1SUG (gross level error indicator byte).
Programming considerations
- For errors related to I/O hardware, a storage dump is issued and CRAS is informed of the condition.
- Certain output operations (such as file type functions) may not be completed following the execution of the waitc function.
Examples
The following example calls the waitc function to ensure that all outstanding
I/O have completed, then issues a message and aborts if the waitc function
indicates an error.
#include <tpf/tpfio.h>
⋮
if(waitc())
{
serrc_op(SERRC_EXIT,0x1234,"ERROR SYNCHRONIZING VPH TAPE",NULL) ;
}Related information
- filnc: File a record with no release
- findc: Find a record
- finhc: Find and hold a file record
- toutc: Write real-time tape record
- tprdc: Read general tape record
- trewc: Rewind general tape and wait
- tsync: Synchronize a tape.
See z/TPF C functions overview for more information about z/TPF C/C++ language support.