Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SYNCSORT merge two files into one

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SYNCSORT merge two files into one
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

Senior Member


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

PostPosted: Fri Jun 06, 2008 8:27 pm    Post subject:
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: 500
Location: USA

PostPosted: Fri Jun 06, 2008 8:57 pm    Post subject: Re: SYNCSORT merge two files into one
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

Senior Member


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

PostPosted: Fri Jun 06, 2008 8:59 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts To Merge mutliple records into a sing... anandgbe DFSORT/ICETOOL 6 Wed Feb 22, 2017 8:49 am
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us