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

Merging 4 files based on some condition


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Nitin Bhargava

New User


Joined: 22 May 2012
Posts: 32
Location: india

PostPosted: Tue Jul 10, 2012 11:59 am
Reply with quote

Hi,



Please share your views how to proceed on below request.



I am having 4 files FILE1,FILE2,FILE3 and FILE4. I have to merge all this files into one file based on following condition:-

If a common record is present in FILE1 and FILE2 then pick the record from FILE1. For uncommon records pick them from their respective files.

The same will goes with the combination of FILE2 and FILE3, and FILE3 and FILE4.

The key in all the four files is present in position (1,13).
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 10, 2012 1:14 pm
Reply with quote

Are the files already in key order? What is the lrecl/recfm of the files?

Can you post some sample data which covers all the situations you need to deal with, with sample output file as well?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top