ILE COBOL Language Reference

OUTPUT Phrase (Sequential Files)

The file is opened to allow only output operations. When the file is successfully opened, it contains no records.

Under OPTION(*NOBLK), the compiler generates code to block output records and unblock input records if the following conditions are satisfied:

The BLOCK CONTAINS clause does not control the blocking factor for any files except tape files.

Device type FORMATFILE and PRINTER can only be opened for output.

Related Information:

Special Considerations for Device Type DISK

If dynamic file creation has been specified, then the OPEN statement will create the file if it is not already available.

+-------------------------------IBM Extension--------------------------------+

Special Considerations for Device Types DISK, DATABASE, and FORMATFILE

Only a physical file is cleared when opened for OUTPUT. When the file is successfully opened, it contains no records. If an attempt is made to open a logical file for OUTPUT, the file is opened but no records are deleted. The file is treated as though the EXTEND phrase had been specified. To clear a logical file, all the members on which the logical file is based should be cleared.

+----------------------------End of IBM Extension----------------------------+


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]