If you do not want a specific record to be kept in an indexed file any more, you can use the DELETE statement to make the record inaccessible.
The DELETE statement is used more or less like the WRITE statement. You must move a coorect key value to the record key field and iisue the DELETE statement.
MOVE "X12" TO M-IDNO.
DELETE MYFILE-REC.
Please note that, when you delete a record, the physical record is NOT deleted. Only the record is rendered inaccessible. Suppose, for instance that an indexed file is 20 Mbytes in total length and you delete half of the records in this file. After all the deletions are completed, you shall see that the file is still 20 Mbytes in length. The only way you can recover the disk space used by deleted records is REORGANIZING the indexed file. (See section "REORGANIZING INDEXED FILES").
The DELETE statement is used more or less like the WRITE statement. You must move a coorect key value to the record key field and iisue the DELETE statement.
MOVE "X12" TO M-IDNO.
DELETE MYFILE-REC.
Please note that, when you delete a record, the physical record is NOT deleted. Only the record is rendered inaccessible. Suppose, for instance that an indexed file is 20 Mbytes in total length and you delete half of the records in this file. After all the deletions are completed, you shall see that the file is still 20 Mbytes in length. The only way you can recover the disk space used by deleted records is REORGANIZING the indexed file. (See section "REORGANIZING INDEXED FILES").