Posted: Wed Jul 25, 2007 12:06 pm Post subject: Sort fields w.r.t Joinkeys in Syncsort
Hi All,
I had a question as to whether the sort fields used along with the JOINKEYS should be same? That is if I am joining two files, each of which has first 8 bytes as keys, then both joinkeys and sort will need to specify 1,8?
What if the two files have keys located on different offsets? I guess SORT works right after Joinkeys... and should be independent of JOINKEYS.
Also this raises few more questions. What will be the sequence of JOINKEYS wrt to other SORT verbs like INREC, OUTREC etc... I tried locating the same in Syncsort manual version 3.6, but joinkeys is not documented. Does it mean this is an undocumented feature of Syncsort, and if so, I guess it would not be advisable to use in production.
Kindly help.
Thanks & Regards,
Hatim. _________________ -Hatim M P
I am attaching the screen dump which shows the synscort version at left top corner of the screen. And is JOIN different then JOINKEYS?. Thanks once again.
Code:
********************************* TOP OF DATA **********************************
SYNCSORT FOR Z/OS 1.2.1.0R U.S. PATENTS: 4210961, 5117495 (C) 2005 SYNCSO
TRS IPC z/OS 1.7.1
PRODUCT LICENSED FOR CPU SERIAL NUMBER 1366A, MODEL 2094 603 LICEN
SYSIN :
************************************************************************
* SORT CARD FOR ####################
************************************************************************
*
JOINKEYS FILES=F1,
FIELDS=(001,003,A, <== xxx
004,005,A) <== yyy
*
JOINKEYS FILES=F2,
FIELDS=(006,003,A, <== xxx
001,005,A) <== yyy
*
JOIN UNPAIRED,F2
*
************************************************************************
*
REFORMAT FIELDS=(F2:017,038, <==
F2:055,010, <==
F1:001,003, <==
F1:004,005, <==
F1:009,012, <==
F2:009,008, <==
F1:256,015, <==
F1:276,001) <==
*
************************************************************************
*
SORT FIELDS=(049,008,CH,A) <== SORT ON KEY
*
************************************************************************
*
OUTFIL FNAMES=E3504O01,
INCLUDE=(049,005,CH,NE,C' ') <== yyy
*
OUTFIL FNAMES=E3504O02,
INCLUDE=(049,005,CH,EQ,C' ') <== yyy
*
************************************************************************
It has been suggested that licensed users can contact SyncSort Mainframe Support at 201.930.8260 or zos_tech@syncsort.com for current manuals and addendums. If email, use your company email address.
Be sure to ask for the PDFs "Addendum. BUILD, IFTHEN, IFOUTLEN, and OVERLAY Parameters" (zos12padd.pdf) and the booklet "Exploiting SyncSort JOIN" (zos12ExploitingJoin.pdf).
Alissa Margulies of SyncSort Mainframe Product Services indicated that I should feel free to pass on her contact info to anyone who is in need of manuals and she would be happy to assist.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Jul 25, 2007 1:45 pm Post subject:
hatim,
Quote:
What if the two files have keys located on different offsets? I guess SORT works right after Joinkeys... and should be independent of JOINKEYS.
The OFFset does NOT matter. The common keys can be any where. You can perform 3 levels of sorting using JOIN feature
1. You can SORT on the Common Key even before joining from file assinged to SORTJNF1.
2. You can SORT on the Common Key even before joining from file assinged to SORTJNF2.
3. Once joined on the common key you then sort on any fields from the reformatted record.
Quote:
Also this raises few more questions. What will be the sequence of JOINKEYS wrt to other SORT verbs like INREC, OUTREC etc... I tried locating the same in Syncsort manual version 3.6, but joinkeys is not documented. Does it mean this is an undocumented feature of Syncsort, and if so, I guess it would not be advisable to use in production.
There is a very good flow as to how JOIN works in the syncsort manual. Since your shop is already a licenced you can request the manuals from Syncsort inc. Alissa from syncsort participates on this board and she can assist you with the manuals
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum