View previous topic :: View next topic
|
Author |
Message |
Hooman24
New User
Joined: 20 Sep 2012 Posts: 35 Location: US
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2018 Location: USA
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2018 Location: USA
|
|
|
|
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... |
|
Back to top |
|
|
Hooman24
New User
Joined: 20 Sep 2012 Posts: 35 Location: US
|
|
|
|
I don't know whether it is possible to simulate JOIN functions with other DFSORT/ICETOOL statements or not. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1245 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1245 Location: Bamberg, Germany
|
|
|
|
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 |
|
|
Hooman24
New User
Joined: 20 Sep 2012 Posts: 35 Location: US
|
|
|
|
@Rohit Umarjikar Yes. I heard that we can do it with sequence number but I don't know its method. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
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 |
|
|
|