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: 4648
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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