Close considerations

When the schedule value is *FILEEND, the output file is made available to the printer writer. The file resources used by the program are deallocated.

If an application program is writing data when the system ends abnormally, the spooled output is shown containing 0 pages on spool displays such as the WRKOUTQ, WRKSPLFA, and WRKJOB displays. Records that were stored in internal system buffers are lost.

Spooled files that contain no records (open and close, but no output) are automatically deleted by the system when the application closes the device file. Writers will not select these files for printing unless SCHEDULE(*IMMED) is specified and the writer selects the file before it is closed.