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

What are declaratives and what are their uses in cobol?

797


What is the difference between comp and comp-3?

796


Difference between array and sub-script ?

1251


How do get the result of your program directly on your pc?

1965


Why did you choose to work with ibm mainframe cobol programming?

730






Write a cobol program making use of the redefine clause.

827


How do we get current date from system with century in COBOL?

928


What is the difference between PIC 9.99 and PIC9v99?

904


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

2061


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1220


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1115


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

2837


What are the access modes of START statement?

814


What are the different rules for performing sort operation?

851


How do u write test cases?

1717