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 |
In a program, variables are used but no DB2 involved in it. Can you call it as host variables??
What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. 05 MM PIC 99. 05 YY PIC 99. (a) Nothing is wrong. (b) Under W-DATE all level 05 items are having a PIC 99 but level 01 has PIC X(6). (c) PIC can't be specified for a group item. (d) DD, MM, and YY are invalid datanames.
Define in-line perform?
what r the types of perform statement
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
can we use 77 level no for Redefines?if we use give an example?
what is the difference between start and startbr?
What are decleratives in COBOL ?
What are the different data types available in COBOL?
what is s013u000 for?
How you can read the file from bottom?
How many types of sorts are there in cobol?