Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us