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 / siri
IN COBOL
IF FILE1>FILE2
READ FILE2
IF FILE1<FILE2
READ FILE1
IF FILE1=FILE2
WRITE FILE3
READ FILE1
READ FILE2.......
IN JCL
//XSUM DD DSN=XSUM.MATCH
//SYSIN DD *
SORT FIELDS=COPY
SUM FIELDS=NONE,XSUM
/*
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
How to know whether the module is dynamical or statistical?
What is report-item in COBOL?
Explain the configuration section of a cobol program with examples of syntax.
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
Define cobol?
What is the usage of comp fields in cobol?
How do you differentiate between cobol and cobol-ii?
How do u write test cases?
what is amode(24), amode(31), rmode(24) and rmode(any)?
Name the divisions, which are available in a cobol program?
Program A (Normal COBBAT) calling a B Program (DB2COBOL, COBBATDB which is using a VSAM file. its a dynamic call. How we will handle VSAM file decleration in our from JCL from where we are running A PGM. And should we have PLAN for A pGM also. if possible can some one post a sample JCL. Thanks for help in advance.
What is the local-storage section?
In which area will you utilize 88 level items in cobol?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?
Name the sections present in data division.