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
How many bytes S(8) comp field occupy and its maximum value?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What the difference is between continue and next sentence?
What is an in line perform? When would you use it? Anything else you wish to say about it.
In COBOL, what is the different between index and subscript?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is comp-1 and comp-2?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
How do you reference the fixed block file formats from cobol programs
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
How do you reference the following file formats from cobol programs?
For rewrite, why is it mandatory that file needs to be opened?
What are the different open modes available in cobol?
Differentiate between structured cobol programming and object-oriented cobol programming.
Mention the guidelines to write a structured cobol program?