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 - Merging multiple files on a key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Aleksandra Sirota

New User


Joined: 29 Jun 2010
Posts: 12
Location: Mettawa, il

PostPosted: Wed Aug 25, 2010 9:58 pm    Post subject: Syncsort - Merging multiple files on a key
Reply with quote

Need to merge multiple files ( 3 or more) which have different fixed lengths. All files need to be merged on the same key, which resides in the same position in all of them ( 2, 7, CH) . The key, which exist in all of the files should be written to the output file.

examples of what I need:

Input 1 :

A0179975 05/01/2010 A04/09/2010 05/13/1997
A0185720 06/01/2010 A05/05/2010 01/22/1997
A0185755 05/01/2010 A04/26/2010 02/12/1997
A0186538 11/01/2009 A10/09/2009 07/31/1998
A0187292 05/01/2010 A04/16/2010 01/31/1997

Input 2 :

A0185720 05/01/2010
A0185755 11/01/2009
A0187292 06/01/2010


Input 3:

A0185720 06/01/2010 01/22/1997
A0185755 05/01/2010 02/12/1997
A0186538 11/01/2009 07/31/1998

Output file should have the following :

0185720
0185755
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Aug 25, 2010 10:13 pm    Post subject: Reply to: Syncsort - Merging multiple files on a key
Reply with quote

Am I missing something?

You state that you want to merge all of the files on the same key (2,7,CH), but then you show that the output consists of only the key. If so, why not just copy the keys from each file, combine them together, and then sort them and eliminate the duplicates?
Back to top
View user's profile Send private message
Aleksandra Sirota

New User


Joined: 29 Jun 2010
Posts: 12
Location: Mettawa, il

PostPosted: Wed Aug 25, 2010 10:23 pm    Post subject:
Reply with quote

I need to get the key , which exist in all 3 files. I don't think it will work by eliminating the duplicates. Maybe it can be done using DFSORT ?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Aug 25, 2010 11:45 pm    Post subject:
Reply with quote

Hello,

Have you verified which sort product is used on the system?

You menton DFSORT, but did not post in the DFSORT part of the forum. . .
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Aug 26, 2010 12:29 am    Post subject: Reply to: Syncsort - Merging multiple files on a key
Reply with quote

Is it me??
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Aug 26, 2010 12:34 am    Post subject:
Reply with quote

Hi Kevin,

Quote:
Is it me??
It's been that kind of week. . .

I believe the desired output is to have a single entry in the output for keys that appear in all 3 input files regardless of duplicates. . .

I may misunderstand. . .

I thought i'd at least try to get this into the correct part of the forum, if it moves from here. . .
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Aug 26, 2010 12:48 am    Post subject: Reply to: Syncsort - Merging multiple files on a key
Reply with quote

From a recent topic from this poster:

Quote:

If you are getting a C sign for Zd instead of an F sign, then you're using Syncsort, not DFSORT. DFSORT gives an F sign for TO=ZD. Try using TO=ZDF. And since you're using Syncsort, please post in the JCL Forum, not in the DFSORT Forum.
Back to top
View user's profile Send private message
Aleksandra Sirota

New User


Joined: 29 Jun 2010
Posts: 12
Location: Mettawa, il

PostPosted: Thu Aug 26, 2010 12:53 am    Post subject:
Reply with quote

Hi, you can close this request. While you were screaming and implying - is it me or is it her who is so stupid - I was able to figure out how to use dfsort and solve this problem. Thanks a lot for your help
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Aug 26, 2010 1:23 am    Post subject:
Reply with quote

Hello,

Well, good to hear it is working icon_smile.gif

However;
Quote:
While you were screaming and implying - is it me or is it her who is so stupid
I saw neither screams nor implications. Just a mention that the question was not well presented. I'm sure you believed what you posted was completely clear but obviously, it was not so clear to everyone. Not to worry - it sometimes takes a couple of iterations to have everyone reach the same understanding of the requirement.

I also saw no reference to stupid - if you are so sensitive and took the dialog that way, i believe you just shared more than you intended. . .

Quote:
I was able to figure out how to use dfsort and solve this problem.
It will probably help someone else if you post your solution.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Aug 26, 2010 3:04 am    Post subject:
Reply with quote

Quote:
I was able to figure out how to use dfsort


Why does the Subject say "Syncsort" if the poster is using DFSORT?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Aug 26, 2010 3:09 am    Post subject: Reply to: Syncsort - Merging multiple files on a key
Reply with quote

Hi Frank,

Possibly because other topics from Aleksandra mention Syncsort and are in the JCL part of the forum. . .

Maybe she'll reply. . .

d
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 syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


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