I want to develop code to compare 2 files (file1 vsam, file2-ref FB)
file1 - F1field1 F1filed2 F1field3 F1field4
aaa 10 x y
bbb 12 o n
file2 - F2field1 F2filed2 F2filed3 F2field4
aaa 10 x b
bbb 12 r n
aaa 10 not matching field4 y
bbb 12 not matching filed3 r
file1 has 100 variables col1 to col
file2 has 10 variables.. lets say filed1 filed2 field3 field4.etc
i want to compare file1 first 2 fields with file2 first 2 fields if matches then compare each field of same record in file1 with reference of file2. i want to write un matched record on the output file. so here the comparision is 1 to many because 1st record in file should be compared with all records in file 2 as its my reference data. if first 2 fields matches but not maching other fields in the record, then i want to write unmatched filed only. not the entire record.
i wrote the logic but getting soc7 when comparing vsam record with other format file. any code for this will be appreciated.
if F1filed1 F1filed match with any records from file2 then compare filed3 and field4 from both files if not matching then write output file F1field1, F1filed2 unmatched filed3
Ask/Clarify the questions on EASYTRIEVE
1 post • Page 1 of 1
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts.
- Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3.
- DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming.
- SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples
- CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program
- FILEAID Reference
Explains how to browse , edit and delete datasets
- Change Man Reference
Quick Start tutorial on Changeman
- Abend Reference
Important Abend codes explained
- FaceBook Page
MainframeGurukul FaceBook Page
- LinkedIn Page
MainframeGurkul Linkedin Page