Hi,
I have used synctool(syncsort V1.4.1) for sorting set of files using my key in one step, I need to made joins with different set of keys for my requirement. Please find the below JCL.
CTL4CNTL :
JOINKEYS FILES=F1,FIELDS=(1,4,A,5,4,A,9,4,A)
JOINKEYS FILES=F2,FIELDS=(1,4,A,5,4,A,9,4,A)
JOIN UNPAIRED F1,F2
REFORMAT FIELDS=(F1:1,80,
F2:1,80)
INREC IFTHEN=(WHEN=(1,1,CH,EQ,C' ',AND,81,1,CH,NE,C' '),
BUILD=(1:C'A',2:81,80)),
IFTHEN=(WHEN=(1,1,CH,NE,C' ',AND,81,1,CH,EQ,C' '),
BUILD=(1:C'D',2:1,80)),
IFTHEN=(WHEN=((13,20,CH,NE,93,20,CH),OR,
(33,10,CH,NE,113,10,CH),OR,(43,1,CH,NE,123,1,CH),
OR,(44,1,CH,NE,124,1,CH),OR,(45,6,CH,NE,125,6,CH),
OR,(51,3,CH,NE,131,3,CH),OR,(54,3,CH,NE,134,3,CH)),
BUILD=(1:C'U',2:81,80))
SORT FIELDS=(1,12,CH,A),DYNALLOC=(SYSDA,99) SORT FIELDS=(1,12,CH,A),DYNALLOC=(SYSDA,99)
OUTFIL FNAMES=CTL1OF04,OMIT=((1,80,CH,EQ,81,80,CH)),
OUTREC=(1,81)
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=CTL4JNF1,SORTDD=CTL4,DYNALLOC
WER428I CALLER-PROVIDED IDENTIFIER IS "0004"
WER164B 92,448K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 32,456K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER481I JOINKEYS REFORMAT RECORD LENGTH= 160, TYPE = F
WER257I INREC RECORD LENGTH = 160
WER110I CTL1OF04 : RECFM=FB ; LRECL= 81; BLKSIZE= 27945
WER074I CTL1OF04 : DSNAME=T.TAP001DP.R150.CAPSCORR.DELT4.G0001V00
WER410B 91,864K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER410B 0 BYTES RESERVE REQUESTED, 31,912K BYTES USED
WER036B G=177559,B=34,BIAS=99
WER162B 0 PREALLOCATED SORTWORK TRACKS, 697,500 DYNAMICALLY ALLOCATED,
WER162B 51,450 ACQUIRED IN 79 SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 748,
WER046A SORT CAPACITY EXCEEDED
WER493I ZIIP PROCESSOR USED
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER066A APROX RCD CNT 227500543
WER482I JNF1 STATISTICS
WER483B 30,388K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 30,384K BYTES USED
WER108I CTL4JNF1 : RECFM=FB ; LRECL= 80; BLKSIZE= 27920
WER073I CTL4JNF1 : DSNAME=TXXXX.TAP001DP.R140.CAPSCORR.FULL4.G0025V00
WER483B 29,800K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
WER483B 0 BYTES RESERVE REQUESTED, 29,864K BYTES USED
WER483B G=181984,B=333,BIAS=50
WER483B 0 PREALLOCATED SORTWORK TRACKS, 255,000 DYNAMICALLY ALLOCATED,
WER483B 0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 246,034 TRACK
WER482I JNF2 STATISTICS
WER483B 30,388K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER483B 0 BYTES RESERVE REQUESTED, 30,384K BYTES USED
WER108I CTL4JNF2 : RECFM=FB ; LRECL= 80; BLKSIZE= 27920
WER073I CTL4JNF2 : DSNAME=TXXXX.TAP001DP.R140.CAPSCORR.FULL4.G0026V00
ER483B 29,800K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
ER483B 0 BYTES RESERVE REQUESTED, 29,864K BYTES USED
ER483B G=227870,B=128,BIAS=83
ER483B 0 PREALLOCATED SORTWORK TRACKS, 742,500 DYNAMICALLY ALLOCATED,
ER483B 459,525 ACQUIRED IN 158 SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 1,1
On further analysis i have known as i need to use MAXSORT technique. as far as i understand MAXSORT would be breaking the sort process into small pieces. At end of each sort process there would be break point will be occured & After all the input for sort has been read & become undividual sorted dataset , this one become input to one or more merges, & final merge has been performed & output is generated.
a) This can be used for attaining the minimal/maximal work space acquire for the sort step
b) Since there is breakpoints, we can restart from the whereever it got abended.
My question is:-
a) How the sort capacity exceeded will be resolved by MAXSORT technique? becoz even though it is divided into small sort process, same amount of time,process & space only will be used. so how it will be used for the abend?
b) If im giving PARM='MAXSORT,MAXWKSP=6000', whether it will be dynamically acquire any space or it will be taken from the DCB paramater of my output dataset?
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
Have you considered the possibility that your analysis is incorrect?
You have 12 SORTs in your single step, three for each SyncTool "SORT".
Four of the SORTs are entirely spurious for certain. You have a distinctly odd-looking OUTFIL OMIT, four times (odd both in its size, and that you have decided to OMIT after a SORT,
rather than before).
Why don't you: confirm whether or not your input data is already in the order you want; split it into four simple steps, each with one JOINKEYS operation; use OPTION COPY in the maintask; drop (or explain, including showing the full sysout) the silly OMIT; take all the DCB information off the output datasets in the JCL; see if it runs in substantially less time.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Murali,
From your sort card it looks like you need the below records in output
'A' records - Keys present in File2 alone
'D' records - Keys present in File1 alone
'U' records - Keys present in both File1 & File2, but with different data, and the record should be selected from File2
But from your job, it seems like all the 'A' and 'D' records will also qualify for the 'U' criteria given.
If this is what you are trying to do, I would suggest changing it as below for more clarity.
The other steps should be modified in a similar manner.
If your input files turn out to be in key order, then you will have gone from 12 SORTs in one step, to no SORTs in four steps. At the very least you are down to eight SORTs in four steps, which will make the management of sort work datasets much easier.
I've have put the indicator byte at the "end" of the output record to avoid unnecessary tossing about of data, but you may be too late for that.
Note that in JOIN UNPAIRED F1,F2, the F1,F2 is a comment. Fortunately JOIN UPAIRED is the same as JOIN UNPAIRED,F1,F2, but if you want the F1,F2 to be a comment, make it much clearer, else you'll have people thinking there is a problem with a missing ",".