Tuesday, 12 August 2014

COBOL Delete Statement.

DELETE statement is used to delete or erase record from Index file. A record should be read succesfully before issusing a DELETE. 
To delete a record from an index sequential file, the file must be opened in the I-O mode. If the access mode is sequential, then the INVALID KEY phrase should not be specified. Instead, the last I/O statement executed on the file must be a successful READ statement for the record specified.

IF the access mode is RANDOM or DYNAMIC, then the record to be deleted is determined by the value of the RECORD KEY. In this case the INVALID KEY phrase should be specified. The INVALID KEY condition arises if the specified is not found in the file.
Format : 
Format : 

No comments:

Post a Comment