IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Merge two files and update Trailer record with ttl and count


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
Yashashri

New User


Joined: 12 Feb 2016
Posts: 5
Location: India

PostPosted: Thu May 04, 2017 12:54 pm
Reply with quote

Hi Guys,

I have two input files and want to merge them. Both files has Header, Detail and trailer record. I want to merge details records and write Header and trailer record only once in Output file and add both files trailer record count and amount field. File is FB and 239.

File 1 :
HEADER AICN021601SCSFTP2017021622510201N
ISCSCNAP160000036BB1702000003 123456 100232INTOIBROUSD201702162
ISCSCNAP160000036BB1702000004 123456 100232INTOIIRAUSD201702162
TRAILER AICN021601SCSFTP000000020000000000000183450+

File 2:

File 2 :
HEADER AICN021601SCSFTP2017021622510201N
ISCSCNAP160000036BB1702000005 123456 100232INTOIBROUSD201702162
ISCSCNAP160000036BB1702000006 123456 100232INTOIIRAUSD201702162
TRAILER AICN021601SCSFTP000000020000000000000183450+

Output Should be :

HEADER AICN021601SCSFTP2017021622510201N
ISCSCNAP160000036BB1702000003 123456 100232INTOIBROUSD201702162
ISCSCNAP160000036BB1702000004 123456 100232INTOIIRAUSD201702162
ISCSCNAP160000036BB1702000005 123456 100232INTOIBROUSD201702162
ISCSCNAP160000036BB1702000006 123456 100232INTOIIRAUSD201702162
TRAILER AICN021601SCSFTP000000040000000000000366900+

Please help. This is urgent.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu May 04, 2017 5:08 pm
Reply with quote

We do not do "urgent". Neither JCL or VSAM can do this. Locked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top