To delete a sequential file thru a COBOL program.. open the file in output mode and close the file immediately. All the records in the file will get deleted.
Thanks
Chethan
Above answer was rated as good by the following members: kkkanagaraj
To delete a sequential file thru a COBOL program.. open the file in output mode and close the file immediately. All the records in the file will get deleted.
y?...it wus right..it is posible to delete contents of a sequential file by opening it in output mode and closing immediately...all data will be truncated...
In cobol there is direct command for deleting records from sequential file. We can follow the below steps and delete the records from sequential file. for example.
There are two ways to delete records in a sequential file 1. To move spaces to the records. 2. To rewrite the file with out moving the records which we want to delete from the file.