ILE COBOL Language Reference

OUTPUT Phrase (Indexed and Relative Files)

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

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. To clear a logical file, all the members on which the logical file is based should be cleared.

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

Related Information:

Special Considerations for Relative Files--Device Type DISK

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

Special Considerations for Indexed Files--Sequential Access

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.

If you specify both OPTION(*BLK) and the BLOCK CONTAINS clause, the blocking factor applies.

Special Considerations for Indexed Files--Dynamic Access

Under OPTION(*BLK), the BLOCK CONTAINS clause causes the compiler to generate code that blocks output records and unblocks input records if the following conditions are satisfied:

If the BLOCK CONTAINS clause specifies a record size of zero, the system default blocking factor applies.


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