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
 

 

New to icetools and struggling with the sort

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

New User


Joined: 16 May 2006
Posts: 11

PostPosted: Tue May 16, 2006 11:38 am    Post subject: New to icetools and struggling with the sort
Reply with quote

Dear all, I am new to icetools and struggling with the sort of the following, please help!

File 1 :
field1 pic9(9)
field2 pic9(8)

12345678933333333
12345678988888888
12345678999999999
23456788811111111
34567890133464646

File 2 :
field1 pic9(9)
field2 pic9(10)
0101010101313131313
1234567891313131311
1234567893313113131
3456789011213311111

Expected result
Try to merge File1 & File 2 based on File 1 if field1 matches
123456789333333331313131311
123456789333333333313113131
123456789888888881313131311
123456789888888883313113131
123456789999999991313131311
123456789999999993313113131
345678901334646461213311111

Thanks in advance
Back to top
View user's profile Send private message

rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Tue May 16, 2006 1:56 pm    Post subject:
Reply with quote

Hi,

Please find the link for the one you are looking

http://www-03.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst02.html#t3a

regards
jai
Back to top
View user's profile Send private message
zaphany

New User


Joined: 16 May 2006
Posts: 11

PostPosted: Tue May 16, 2006 2:29 pm    Post subject: Re: please help in sorting
Reply with quote

Thanks Jai, i did read this example and tried, but the case I am facing is that field1 in both files can appear more than once and I am trying to get all the combinations...
please help...
icon_sad.gif
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: Tue May 16, 2006 8:12 pm    Post subject:
Reply with quote

zaphany,

You're trying to do a cartesian join. SPLICE can't do that.
Back to top
View user's profile Send private message
zaphany

New User


Joined: 16 May 2006
Posts: 11

PostPosted: Wed May 17, 2006 11:29 am    Post subject:
Reply with quote

Thanks Frank! looks like i need to write programs for that...
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:28 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=*
//FILE1 DD *
12345678933333333
12345678988888888
12345678999999999
23456788811111111
34567890133464646
//FILE2 DD *
cccccccccdddddddddd
0101010101313131313
1234567891313131311
1234567893313113131
3456789011213311111
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  JOINKEYS F1=FILE1,FIELDS=(1,9,A),SORTED
  JOINKEYS F2=FILE2,FIELDS=(1,9,A),SORTED
  REFORMAT FIELDS=(F1:1,17,F2:13,10)
  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 Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts JCL sort Match and NoMatch rakeshsekar1987 SYNCSORT 2 Thu Feb 02, 2017 10:26 pm


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