I want to remove a duplicates form a given input field using cobol program. please Any one help me out to solve this ... Thanks in Advance.
Answer Posted / meghraj hulawale
Procedure Division.
1.Open vsam file as INPUT mode.
2. Copy the records of VSAM FILE into Table or Array by using occurs clause.
3.Count no. of records in VSAM FILE.
4.By using perform statement.
e.g
perform until I < vsam-cnt
read vsam file
perform until j < no-of-records in table or vsam-cnt
if vsam-data NOT =Table-record
A. Open another Output file as OUTPUT mode.
B. Write output file.
end-if.
increase the value of j as 1.
end-perform.
increase the value I as 1.
end-perform.
Stop run.
******Note
We need to access vsam as sequential.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain about different table spaces.
Write some characteristics of cobol as means of business language.
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
What is a scope terminator give example?
how to move the records from file to array table. give with code example
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
) How do u handle errors in BMS macro?
Which is not true about evaluate statement
How to remove 2 duplicate records and copy only one using job control language?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
Can we redefine the field of x(200) to less than 200?
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What is redefines clause in COBOL?