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

SYNCSORT merge two files into one


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sashi

New User


Joined: 14 Sep 2005
Posts: 54
Location: Chennai

PostPosted: Fri Jun 06, 2008 7:01 pm
Reply with quote

I have 2 files 1) FILE-A with LRECL=200 and 2)FILEB with LRECL=300.
I need to merge these two files into one single file say FILEC.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jun 06, 2008 8:27 pm
Reply with quote

Hi,

Ok, when you tried this what happened, what was the error message? And what did You tried, please post the JCL used & error messages if any.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Fri Jun 06, 2008 8:57 pm
Reply with quote

sashi wrote:
I have 2 files 1) FILE-A with LRECL=200 and 2)FILEB with LRECL=300.
I need to merge these two files into one single file say FILEC.

Please be more specific when you use the term "Merge". Are both files pre-sorted based on the same sort key? Do they need to be sorted? Or do you just want them both copied into a 3rd file?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Jun 06, 2008 8:59 pm
Reply with quote

Hi,

Me again.. assuming the input files have RECFM=FB, you have to pad the shorter one to the length of the longer one before you can merge them. If you need more specific help on this, tell me the RECFM and LRECL of each input file, and whether you actually want to merge the files or just copy them.

To merge the input files, they must already be in sorted order and the output records will be in sorted order.

Copying the files means the output file will have all of the records of the first input file followed by all of the records of the second input file.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jun 06, 2008 9:01 pm
Reply with quote

What would be the format of the output variable or fixed (what LRECL) are the input records fixed or variable?
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
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