How to delete the records of a dataset through cobol
programme?We should not use jcl utilitities like IDCAMS.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
i want to enter the name 'pandu' into ur table how?
when COMP-3 is preferrable?
How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
what is the diff b/w select stsmt and cursor ?
I have dataset DS1 which has records say 1 2 3 4 5 ... ... etc And also I have second dataset DS2 whcih has records 1 3 4 5 6 8 .. ... Both the files are sorted and now I want to compare these files and write it into the third files if the records are matching.
what is meant by binary search?
What are the different data types in cobol?
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
Why IBM?
record length in spool?
hai friends ,i have HSBc exam on this sunday,my platform is Mainframe,i have 1 year exp,pls any one send me placement papers of Hsbc and technical questions on mainframe
6 Answers Citi Bank, CitiGroup, HSBC, iNautix, Wipro,