Hi ,
I have a requirement to combine records of two input files and write into one single file.In addition to this i need to update the trailer count.
The two input files AAA and BBB are of record length 799 and FB.
The output file is also of same format and length
AAA file will have 1-n records .It has only detail records indicated by record code (REC-CD) = 10 in first two positions
BBB file can have details records but will always have header record and trailer record indicated by record code(REC-CD) = 0 and 9 respectively in first position.
Example:
Lets say if i have 5 records in input file AAA .
AAA file :
10ACCOUNTNUM:123451
10ACCOUNTNUM:123452
10ACCOUNTNUM:123453
10ACCOUNTNUM:123454
10ACCOUNTNUM:123455
And lets say if i have 2 records in input file BBB with just one header and trailer record
BBB File:
020152602SYSCD
912000000
There is a count field in trailer record which occupies position 2-9 with length 8 .
I need to append the records of both files and also I need to add the number 12000000 in BBB file with the number of records present in AAA file
and update trailer count in output.
The data records and header record are copied as it is but the trailer record count needs to be updated.
So the output file CCC should have the following data
10ACCOUNTNUM:123451
10ACCOUNTNUM:123452
10ACCOUNTNUM:123453
10ACCOUNTNUM:123454
10ACCOUNTNUM:123455
020152602SYSCD
912000005
Could you please guide me on how to achieve this using SYNCSORT/ICETOOL ?
Merge two files data nd update trailer count
Moderators: Frank Yaeger, Moderator Group
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 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