IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can we simulate JOINKEYS in ICETOOL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Hooman24

New User


Joined: 20 Sep 2012
Posts: 35
Location: US

PostPosted: Fri Jan 15, 2021 8:10 pm
Reply with quote

I am trying to run a long job with many steps(auto generated from IBM) in an old system. In one of the steps there is a SORT program. However it seems that JOINKEYS is not supported in this system. I'm not a DFSORT expert. Is there any way to simulate JOINKEYS in ICETOOL?

here is the step:

Code:

//STEP025   EXEC  PGM=SORT,COND=(0,NE,STEP020)
//*SORTLIB DD DSN=_sortdsn_,DISP=SHR
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=&&DATA2,DISP=(OLD,DELETE)
//IN2 DD DSN=&&DATAF,DISP=(OLD,PASS)
//*ORTOUT DD SYSOUT=*
//SORTOUT DD DSN=&&DATAV,DISP=(NEW,PASS),
//          SPACE=(CYL,(100,20),RLSE),
//          UNIT=SYSDA,DCB=(RECFM=FB,LRECL=614,BLKSIZE=24560)
//SYSIN DD *
    JOINKEYS F1=IN1,FIELDS=(13,12,A)
    JOINKEYS F2=IN2,FIELDS=(205,12,A)
    REFORMAT FIELDS=(F1:1,12,F2:1,204,F1:25,398)
    OPTION COPY
/*

Coded for you
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Fri Jan 15, 2021 9:00 pm
Reply with quote

ICETOOL performs all operations using calls to DFSORT.

DFSORT cannot be not able to support JOINKEYS; check your code carefully, or post here all required information:
- source code (both JCL, and SORT statements)
- input data
- error messages
- output data (if any)
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jan 15, 2021 9:35 pm
Reply with quote

Quote:
DFSORT cannot be not able to support JOINKEYS


the TS already told that the DFSORT version available is very old

see here when DFSORT started supporting joinkeys

www.ibm.com/support/pages/sites/default/files/inline-files/$FILE/sorttrck.pdf
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Fri Jan 15, 2021 10:04 pm
Reply with quote

Anyway, ICETOOL cannot support what is not supported by DFSORT.
ICETOOL is only the “manager” to give tasks to its “employee”, - DFSORT.

There is no manager in this world who can do something not prepared for him by his employees... sterb050.gif
Back to top
View user's profile Send private message
Hooman24

New User


Joined: 20 Sep 2012
Posts: 35
Location: US

PostPosted: Fri Jan 15, 2021 11:05 pm
Reply with quote

I don't know whether it is possible to simulate JOIN functions with other DFSORT/ICETOOL statements or not.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Fri Jan 15, 2021 11:17 pm
Reply with quote

What I get is TS wants to know how we can achieve the same results without using JOINKEYS.

If that's true then you can try
1. SPLICE ( if you old system supports that)
2. try MERGE/SORT on keys and reformat/GROUP using seqnum method.

If I get time I will try.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1245
Location: Bamberg, Germany

PostPosted: Fri Jan 15, 2021 11:33 pm
Reply with quote

ICETOOL SPLICE has some functionality that could possibly replace what JOINKEYS is supposed to do. Some of the required functions however were added at a later stage and may not be available for your system.

At a first glance I would say this is possible to emulate but I have not used ICETOOL for a longer period now.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1245
Location: Bamberg, Germany

PostPosted: Sat Jan 16, 2021 12:04 am
Reply with quote

AFAICR, the keys have to be at the same position to use the use the ON keyword, then one would use some WITH(..) fields and some of the other WITH* keywords (like WITHANY and WITHALL and such). Sequence of Input Datasets might be important to get the right results.
Back to top
View user's profile Send private message
Hooman24

New User


Joined: 20 Sep 2012
Posts: 35
Location: US

PostPosted: Sat Jan 16, 2021 12:53 am
Reply with quote

@Rohit Umarjikar Yes. I heard that we can do it with sequence number but I don't know its method.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Fri Jan 22, 2021 4:42 am
Reply with quote

Hooman24,
Please bookmark these tricks , Very helpful. Your answer how to do with SPLICE is on page-14 onwards, look at the three examples JOINKEYS Vs SPLICE. Try it and let us know
Key in different places, duplicates
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
Search our Forums:

Back to Top