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
 

 

Like to do a Cartesian join between two file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
natan123

New User


Joined: 02 Aug 2006
Posts: 1

PostPosted: Wed Aug 02, 2006 7:40 pm    Post subject: Like to do a Cartesian join between two file
Reply with quote

hi,
i would like to do a Cartesian join between two file for example i have two
files A and B my key is the first three characters :
A
111 123456
111 987565
111 365845
222 333333

B
111 a
111 b
222 c

output :
111 123456 a
111 987565 a
111 365845 a
111 123456 b
111 987565 b
111 365845 b
222 333333 c
Back to top
View user's profile Send private message

sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed Aug 02, 2006 9:10 pm    Post subject:
Reply with quote

Hi,
If you are having SYNCSORT latest version,use the JOIN FEATURE to get the desired results.
If you are having DFSORT ,Use the SPLICE operator.

Lot many examples are available in the forum.Please check.

Thank you
Krishy
Back to top
View user's profile Send private message
natan66

New User


Joined: 16 Sep 2005
Posts: 5

PostPosted: Wed Aug 02, 2006 11:42 pm    Post subject: Re: Like to do a Cartesian join between two file
Reply with quote

i didn't figure the way to do a many to many join with splice.
can anyone give me an example.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Thu Aug 03, 2006 12:28 am    Post subject: Re: Like to do a Cartesian join between two file
Reply with quote

Did you do a search for "cartesian" before posting?

Please read this previous post.
Back to top
View user's profile Send private message
natan66

New User


Joined: 16 Sep 2005
Posts: 5

PostPosted: Thu Aug 03, 2006 11:26 pm    Post subject: Re: Like to do a Cartesian join between two file
Reply with quote

hi,
I looked for the word join.

thanks for the help anyway.
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: Wed Nov 25, 2009 4:20 am    Post subject:
Reply with quote

With z/OS DFSORT V1R5 PTF UK51706 or z/OS DFSORT V1R10 PTF UK51707 (Nov, 2009), you can now do a Cartesian join with JOINKEYS. For your example, you could use a DFSORT job like this:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//A DD *
111 123456
111 987565
111 365845
222 333333
//B DD *
111 a
111 b
222 c
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  JOINKEYS F1=B,FIELDS=(1,3,A),SORTED
  JOINKEYS F2=A,FIELDS=(1,3,A),SORTED
  REFORMAT FIELDS=(F2:1,11,F1:5,1)
  OPTION COPY
/*


For complete details on JOINKEYS and the other new functions available with the Nov, 2009 DFSORT PTF, see:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000174
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts SSH - known_hosts file configuration vasanthz All Other Mainframe Topics 2 Wed Jul 26, 2017 2:10 am
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm


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