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

Answer Posted / vivek chandrasekaran

If the file we are using is VSAm file then we can go for Key mentioned,
If it is a sequential file we have to read till the 49th record then needs to delete the 50th record, this is the main disadvantage with Sequential files.

Syntax for deleting record.

DELETE file_name RECORD

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you define a variable of comp-1 and comp-2?

699


How you can read the file from bottom?

654


Define cobol?

856


How many bytes S(8) comp field occupy and its maximum value?

1624


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2718






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

814


How can you get the ksds file records into your cobol program?

637


How to use the same COBOL program in Batch and CICS on lines? explain with an example

1910


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

651


A table has two indexes defined. Which one will be used by the SEARCH?

750


Write the code implementing the perform … varying.

638


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

737


How are the next sentence and continue different from each other?

756


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2095


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

672