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 to traceback if I am getting SOC7 or SOC4 abend? List down the steps
What type of SDLC u followed? Why?
Explain the configuration section of a cobol program with examples of syntax.
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
Whats the difference between search & search ALL?
What rules are to be followed while using the corresponding options?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
Write the code to count the sum of n natural numbers.
Explain how to differentiate call by context by comparing it to other calls?
Which Search verb is equivalent to PERFORM…VARYING?
What is the difference between comp and comp-3?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
How do we get current date from system with century in COBOL?
How do get the result of your program directly on your pc?
Discuss about changing dataset name in proc.