How to delete the records of a dataset through cobol
programme?We should not use jcl utilitities like IDCAMS.

Answer Posted / janardhan

we can delete by usinf the files concept.

if case of sequential file there is no direct delete option.
for this

1) read the record and rewrite with spaces.
2) read record from one file and write it into another file
by excluding the record which has to be deleted.

if case of indexed file we can directly delete the record
as it contains the indexed no.

same for relative files.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

813


Explain the configuration section of a cobol program with examples of syntax.

754


Name some of the examples of COBOl 11?

2782


Can we redefine the field of x(200) to less than 200?

955


What are the various section in data division and briefly explain them.

815






How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2838


Define static linking and dynamic linking.

766


What are the access modes of START statement?

814


Which division and paragraphs are mandatory for a COBOL program?

792


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8492


i need a small 3d program using inline and outline.

1748


) what is the difference between AID and HANDLE AID?

1742


Which is not true about evaluate statement

1844


What are different data types in cobol?

790


Can a Search can be done on a table with or without Index?

924