A cobol program to read a file , match it with other if.
If match occurs then write it to an output file. If no
match then no need to write it.Error log created by program
to track any error.



A cobol program to read a file , match it with other if. If match occurs then write it to an output..

Answer / ajay kumar ande

procedure:
1. take 4 seq. files,read two files
2.if rec1(key1)=rec2(key2)
write record3
else
write record4

or using jcl
pgm=iebcmpr
sysut1 dd dsn=dataset1
sysut2 dd dsn=dataset2
sysin dd *
compare typorg=ps/po

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More COBOL Interview Questions

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?

15 Answers   ADP, Broadridge, CTS, HSBC, L&T, RBS, TCS,


how to convert the recors form vsam file to db2 table tru file aid

0 Answers   TCS,


01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?

6 Answers   L&T,


How to fetch 1000 error records from VSAM file(Eg: 1000000 records present) while getting SOC7 abend ?

0 Answers  


What are subroutines ? and how do we pass data to the sub routines?

2 Answers   Xansa,






what is the use of comp2 ? where can we use it with example ?

3 Answers   Covansys,


What are the different forms of EVALUATE statement?

2 Answers   IBM, Micro Labs,


What is SDSF?

13 Answers   IBM,


What R 2 of the common forms of the EVALUATE STATEMENT ?

1 Answers   Cap Gemini,


i want all ERRORS codes in COBOL ,JCL,VSAM ,DB2,CICS

4 Answers   Infosys,


Scenario: I have 3 Input Files.Read the first i/p file and depending on certain business logic, I want to read wither i/p file-2 or i/p file-3.Now, depending on certain business logic applied to the record read from either file-2 or file-3, I decide to write them to either output file-2 or output file-2. Question: How many job steps are necessary to implement a solution for the above.

2 Answers   TCS,


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

0 Answers   IBM,


Categories