I am having the following files.
TEST FILE:
Acct num: 12345 Trancode : 481 Amt: 125
Acct num: 12345 Trancode : 488 Amt: 128
Acct num: 12345 Trancode : 488 Amt: 123
Acct num: 12345 Trancode : 482 Amt: 122
PROD FILE:
Acct num: 12345 Trancode : 481 Amt: 125
Acct num: 12345 Trancode : 488 Amt: 123
Acct num: 12345 Trancode : 482 Amt: 122
The extra record is 3rd one in TEST FILE.Iam saying so by manually checking the amount field.
The accounts are sorted with account number.
I want that to be written into separate file.
I have written normal file compare logic based on acct num.With this logic it is comparing first three records in both the files and writing the mismatches in Output file 1.It is considering the 4th record in TEST file as extra record and writing it to Output File 2, which is wrong.The 3rd record should be written to the output file2.
I have also tried to sort the trancode but have same trancode for extra record and original record.
Note: I have just given a example with acct num,Trancode,Amt fields.Originally my test and Prod files have 36 different fields.
Please ask quations for any more infio.
Need a compare logic to compare two files as below mentioned
Moderators: dbzTHEdinosauer, Moderator Group
-
- Member
- Posts: 1
- Joined: Tue Jul 26, 2016 9:35 am
FREE TUTORIALS
Tutorials
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.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
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