I have the requirement to compare the two files and pick up
the matching records.
File 1. file2

23 32
32 13
34 15
35 36
36 35
43

Get the matching records from this 2 files to out file. how
you will do this in cobol program?

Answer Posted / michar de papachuil

This might help you here but you have to Sort the two files
first before doing the match.

IF File1 = File2
PERFORM 2400-MATCH-BOTH-FILES THRU 2400-EXIT
PERFORM 2100-READ-FILE1 THRU 2100-EXIT
PERFORM 2200-READ-FILE2 THRU 2200-EXIT

ELSE

IF I-GROUP-SUBSYSTEM LESS THAN I-MODULE-SUBSYSTEM
PERFORM 2600-UNKNOWN-FILE1-VALUES THRU 2600-EXIT
PERFORM 2100-READ-FILE1 THRU 2100-EXIT
ELSE
PERFORM 2500-UNKNOWN-FILE2-VALUES THRU 2500-EXIT
PERFORM 2200-READ-FILE2 THRU 2200-EXIT
END-IF

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are INPUT PROCEDURE and OUTPUT PROCEDURE?

662


In COBOL, what is the different between index and subscript?

732


In COBOL programming, what is PERFORM? What is VARYING?

650


How many bytes S(8) comp field occupy and its maximum value?

1601


I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?

1206






Explain what you understand by passing by value.

661


Write a cobol program making use of the redefine clause.

701


How do get the result of your program directly on your pc?

1848


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.

2026


What are the rules of the move verb?

672


What is length is cobol?

628


What type of SDLC u followed? Why?

1494


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2072


) How do u handle errors in BMS macro

1478


Write a program that uses move corresponding.

645