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
How do you define a variable of comp-1 and comp-2?
how do you reference the rrds file formats from cobol programs
What is redefines clause in COBOL?
How to know whether the module is dynamical or statistical?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?
Mention the guidelines to write a structured cobol program?
How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?
Write a program to explain size error.
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?
Write some characteristics of cobol as means of business language.
What is the difference between external and global variables in COBOL?
Name the sections present in data division.
Name some of the examples of COBOl 11?
What is the difference between PIC 9.99 and PIC9v99?
What is the difference between binary search and sequential search?