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
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
Name the sections present in data division.
Differentiate between structured cobol programming and object-oriented cobol programming.
Write down the divisions of cobol program?
What is the difference between binary search and sequential search?
Difference between cobol and cobol-ii?
What is the use of intialize verb?
What is static and dynamic call in cobol?
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
how to refer the data field?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
What are various search techniques in cobol? Explain.
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need