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
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
What do you understand by psb and acb?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
What is static and dynamic call in cobol?
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
What is link edit in cobol?
How are the next sentence and continue different from each other?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
What is rmode(24)
Which is not true about evaluate statement
how can i see junk values in dclgen or in hostvariable of comp ?
example for sub strings ? and refernce modifications whit output pls
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
When is inspect verb is used in cobol?
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?