ILE COBOL Language Reference

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


DROP Statement

The DROP statement releases a program device that has been acquired by a TRANSACTION file.

DROP Statement - Format
 
>>-DROP--+-identifier-+--FROM--file-name-----------------------><
         '-literal----'
 
 
literal, identifier
Literal or the contents of identifier indicates the program device name of the device to be dropped. Literal, if specified, must be nonnumeric and 10 characters or less in length. Identifier, if specified, must refer to an alphanumeric data item, 10 characters or less in length.
file-name
File-name must refer to a file with an organization of TRANSACTION, and the file must be open in order to be used in the DROP statement. If no DROP statement is issued, program devices attached to a TRANSACTION file are implicitly released when that file is finally closed.

Program devices specified in a DROP statement must have been acquired by the TRANSACTION file, either through an explicit ACQUIRE or through an implicit ACQUIRE at OPEN time.

After successful execution of the DROP statement, the program device is no longer available for input or output operations through the TRANSACTION file. The device may be reacquired if necessary. The contents of the record area associated with a released program device are no longer available, even if the device is reacquired.

If the DROP statement is unsuccessful, any applicable USE AFTER EXCEPTION/ERROR procedures are executed.

The DROP statement can also be used as an aid in recovering from I-O errors. For more information, see the Transaction File Recovery procedures in the ILE COBOL for AS/400 Programmer's Guide.

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


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