Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Regd MAXSORT technique in syncsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
muralikrishnan_new

New User


Joined: 02 Jun 2013
Posts: 11
Location: India

PostPosted: Thu Jun 13, 2013 1:00 am    Post subject: Regd MAXSORT technique in syncsort
Reply with quote

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.

Code:
//TXXXXXX JOB (12345),'JCL',CLASS=E,                 
//           MSGCLASS=X,NOTIFY=&SYSUID,               
//           MSGLEVEL=(1,1)                                                     
//*                                                   
//  SET CORR=CORR,JN=TAP001DP,P=TXXXXX         
//*                                                   
//R150     EXEC PGM=SYNCTOOL               
//CTL1JNF1 DD  DSN=&P..&JN..R090.CAPSCORR.FULL1(-1),   
//             DISP=SHR                               
//CTL1JNF2 DD  DSN=&P..&JN..R090.CAPSCORR.FULL1(0),     
//             DISP=SHR                               
//CTL2JNF1 DD  DSN=&P..&JN..R100.CAPSCORR.FULL2(-1),   
//             DISP=SHR                               
//CTL2JNF2 DD  DSN=&P..&JN..R100.CAPSCORR.FULL2(0),     
//             DISP=SHR                               
//CTL3JNF1 DD  DSN=&P..&JN..R110.CAPSCORR.FULL3(-1),   
//             DISP=SHR                               
//CTL3JNF2 DD  DSN=&P..&JN..R110.CAPSCORR.FULL3(0),     
//             DISP=SHR                               
//CTL4JNF1 DD  DSN=&P..&JN..R140.CAPSCORR.FULL4(-1), 
//             DISP=SHR                             
//CTL4JNF2 DD  DSN=&P..&JN..R140.CAPSCORR.FULL4(0),   
//             DISP=SHR                             
//CTL1OF01 DD  DSN=T.TAP001DP.R150.CAPSCORR.DELT1(+1),
//             DISP=(NEW,CATLG,DELETE),             
//             UNIT=SYSDA,                           
//             AVGREC=K,                             
//             SPACE=(66,(1500,500),RLSE),           
//             DCB=(RECFM=FB,LRECL=66)               
//CTL1OF02 DD  DSN=T.TAP001DP.R150.CAPSCORR.DELT2(+1),
//             DISP=(NEW,CATLG,DELETE),             
//             UNIT=SYSDA,                           
//             AVGREC=K,                             
//             SPACE=(21,(1500,500),RLSE),           
//             DCB=(RECFM=FB,LRECL=21)               
//CTL1OF03 DD  DSN=T.TAP001DP.R150.CAPSCORR.DELT3(+1),
//             DISP=(NEW,CATLG,DELETE),             
//             UNIT=SYSDA,                           
//             AVGREC=K,                             
//             SPACE=(24,(1500,500),RLSE),           
//             DCB=(RECFM=FB,LRECL=24)                 
//CTL1OF04 DD  DSN=T.TAP001DP.R150.CAPSCORR.DELT4(+1), 
//             DISP=(NEW,CATLG,DELETE),               
//             UNIT=SYSDA,                             
//             AVGREC=K,                               
//             SPACE=(81,(1500,500),RLSE),             
//             DCB=(RECFM=FB,LRECL=81)                 
//TOOLIN   DD  *
SORT FROM(CTL1JNF1) USING(CTL1)
SORT FROM(CTL2JNF1) USING(CTL2)
SORT FROM(CTL3JNF1) USING(CTL3)
SORT FROM(CTL4JNF1) USING(CTL4)
/*                                     
//CTL1CNTL DD 
JOINKEYS FILES=F1,FIELDS=(1,3,A,4,3,A,7,7,A)                         
JOINKEYS FILES=F2,FIELDS=(1,3,A,4,3,A,7,7,A)                         
JOIN UNPAIRED F1,F2                                                 
REFORMAT FIELDS=(F1:1,65,                                           
                 F2:1,65)                                           
 INREC IFTHEN=(WHEN=(1,1,CH,EQ,C' ',AND,66,1,CH,NE,C' '),           
              BUILD=(1:C'A',2:66,65)),                               
       IFTHEN=(WHEN=(1,1,CH,NE,C' ',AND,66,1,CH,EQ,C' '),           
              BUILD=(1:C'D',2:1,65)),                               
       IFTHEN=(WHEN=((14,3,CH,NE,79,3,CH),OR,(17,3,CH,NE,82,3,CH),   
                OR,(20,20,CH,NE,85,20,CH),OR,(40,10,CH,NE,105,10,CH),
                 OR,(50,1,CH,NE,115,1,CH),OR,(51,6,CH,NE,116,6,CH), 
                 OR,(57,9,CH,NE,122,9,CH)),                         
              BUILD=(1:C'U',2:66,65))                               
SORT FIELDS=(1,13,CH,A),DYNALLOC=(SYSDA,99)                         
OUTFIL FNAMES=CTL1OF01,OMIT=((1,65,CH,EQ,66,65,CH)),                 
OUTREC=(1,66)                                                         
/*                               
//CTL2CNTL DD 
JOINKEYS FILES=F1,FIELDS=(1,3,A,4,7,A)                             
JOINKEYS FILES=F2,FIELDS=(1,3,A,4,7,A)                             
JOIN UNPAIRED F1,F2                                                 
REFORMAT FIELDS=(F1:1,20,                                           
                 F2:1,20)                                           
 INREC IFTHEN=(WHEN=(1,1,CH,EQ,C' ',AND,21,1,CH,NE,C' '),           
              BUILD=(1:C'A',2:21,20)),                             
       IFTHEN=(WHEN=(1,1,CH,NE,C' ',AND,21,1,CH,EQ,C' '),           
              BUILD=(1:C'D',2:1,20)),                               
       IFTHEN=(WHEN=((11,4,CH,NE,31,4,CH),OR,(15,6,CH,NE,35,6,CH)),
              BUILD=(1:C'U',2:21,20))                               
SORT FIELDS=(1,10,CH,A),DYNALLOC=(SYSDA,99)                         
OUTFIL FNAMES=CTL1OF02,OMIT=((1,20,CH,EQ,21,20,CH)),               
OUTREC=(1,21)                                                         
/*                               
//CTL3CNTL DD  *
JOINKEYS FILES=F1,FIELDS=(1,4,A,5,7,A)                               
JOINKEYS FILES=F2,FIELDS=(1,4,A,5,7,A)                               
JOIN UNPAIRED F1,F2                                                 
REFORMAT FIELDS=(F1:1,23,                                           
                 F2:1,23)                                           
 INREC IFTHEN=(WHEN=(1,1,CH,EQ,C' ',AND,24,1,CH,NE,C' '),           
              BUILD=(1:C'A',2:24,23)),                               
       IFTHEN=(WHEN=(1,1,CH,NE,C' ',AND,24,1,CH,EQ,C' '),           
              BUILD=(1:C'D',2:1,23)),                               
       IFTHEN=(WHEN=((12,3,CH,NE,35,3,CH),OR,(15,8,CH,NE,38,8,CH),   
                                          OR,(23,1,CH,NE,46,1,CH)), 
              BUILD=(1:C'U',2:24,23))                               
SORT FIELDS=(1,11,CH,A),DYNALLOC=(SYSDA,99)                         
OUTFIL FNAMES=CTL1OF03,OMIT=((1,23,CH,EQ,24,23,CH)),                 
OUTREC=(1,24)                                                         
/*                               
//CTL4CNTL DD  *
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)                         
OUTFIL FNAMES=CTL1OF04,OMIT=((1,80,CH,EQ,81,80,CH)),                 
OUTREC=(1,81)                                                         
/*                                                             
//TOOLMSG  DD  SYSOUT=*                               
//DFSMSG   DD  SYSOUT=* 
//SYSOUT   DD  SYSOUT=* 
//SYSPRINT DD  SYSOUT=* 
//SYSUDUMP DD  SYSOUT=A 
//CEEDUMP  DD  SYSOUT=A 


But i got abend for the job as stating the reason below

From JESMSGLG:-
Code:
 +WER046A TSOMMAKK,R150    ,        -SORT CAPACITY EXCEEDED       
+WER066A TSOMMAKK,R150    ,        -APROX RCD CNT       227500543
ACT002E    R150              SYNCTOOL 00:03:09.24  0016           


From Sysout:-

Code:

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?


Could some one enlighten me more abt the MAXSORT?
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Jun 13, 2013 1:58 am    Post subject: Reply to: Regd MAXSORT technique in syncsort
Reply with quote

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.

Leave MAXSORT for a big dataset.
Back to top
View user's profile Send private message
muralikrishnan_new

New User


Joined: 02 Jun 2013
Posts: 11
Location: India

PostPosted: Thu Jun 13, 2013 9:15 am    Post subject: Reply to: Regd MAXSORT technique in syncsort
Reply with quote

Bill,
Thank you for replying. I would try ur logic & let me get results.. Thanks Again bill..
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Thu Jun 13, 2013 10:59 am    Post subject:
Reply with quote

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.
Code:
JOINKEYS FILES=F1,FIELDS=(1,12,A)                         
JOINKEYS FILES=F2,FIELDS=(1,12,A)                         
JOIN UNPAIRED F1,F2                                                 
REFORMAT FIELDS=(F1:1,80,                                           
                 F2:1,80)                                           
 INREC IFTHEN=(WHEN=(1,1,CH,EQ,C' '),           
              BUILD=(1:C'A',2:81,80)),                               
       IFTHEN=(WHEN=(81,1,CH,EQ,C' '),           
              BUILD=(1:C'D',2:1,80)),                               
       IFTHEN=(WHEN=(1,1,CH,NE,C' ',AND,81,1,CH,NE,C' ',AND,
                     13,68,CH,NE,93,68,CH), 
              BUILD=(1:C'U',2:81,80))                               
SORT FIELDS=COPY,DYNALLOC=(SYSDA,99)                         
OUTFIL FNAMES=CTL1OF04                                         
/*
Back to top
View user's profile Send private message
muralikrishnan_new

New User


Joined: 02 Jun 2013
Posts: 11
Location: India

PostPosted: Sun Jun 16, 2013 4:15 pm    Post subject: Reply to: Regd MAXSORT technique in syncsort
Reply with quote

Thanks Bill & Arun! , We have splitted the steps & i have executed the job. it worked fine.. Thank you. Thanks a lot
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Sun Jun 16, 2013 10:29 pm    Post subject: Reply to: Regd MAXSORT technique in syncsort
Reply with quote

Thanks for letting us know.

However, did you look at everything that was suggested? Can you post an example of one of the new steps?
Back to top
View user's profile Send private message
muralikrishnan_new

New User


Joined: 02 Jun 2013
Posts: 11
Location: India

PostPosted: Mon Jun 17, 2013 2:52 pm    Post subject: Reply to: Regd MAXSORT technique in syncsort
Reply with quote

Bill,
Please find the below job which i have used,

Code:

//TXXXXXXK JOB (12345),'JCL',CLASS=G,                     
//           MSGCLASS=X,NOTIFY=&SYSUID,                   
//           MSGLEVEL=(1,1),                             
// USER=TXXXXX,PASSWORD=                                 
//*                                                       
//*                                                                         
//STEP01   EXEC PGM=SORT                                 
//SORTJNF1 DD DSN=T.TAP001DP.R140.CAPSCORR.FULL4(-1), 
//         DISP=SHR                                       
//SORTJNF2 DD DSN=T.TAP001DP.R140.CAPSCORR.FULL4(0),   
//         DISP=SHR                                       
//SORTOUT  DD DSN=T.TAP001DP.R000.CAPSCORR.DELT,       
//         DISP=(NEW,CATLG,DELETE),                       
//         UNIT=SYSDA,                                   
//         SPACE=(CYL,(5,5),RLSE),                       
//         STORCLAS=CTSDASD                               
//SYSOUT   DD SYSOUT=*                                   
//SYSIN    DD *                                           
  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' '),                               
                BUILD=(1:C'A',2:81,80)),                             
         IFTHEN=(WHEN=(81,1,CH,EQ,C' '),                             
                BUILD=(1:C'D',2:1,80)),                               
         IFTHEN=(WHEN=(1,1,CH,NE,C' ',AND,81,1,CH,NE,C' ',AND,       
                       13,68,CH,NE,93,68,CH),                         
                       BUILD=(1:C'U',2:81,80))                       
  SORT FIELDS=(1,12,CH,A),DYNALLOC=(SYSDA,99)                         
  OUTFIL OUTREC=(1,81)                                               
/*                                                                   


Sysout: -

Code:

SYNCSORT FOR Z/OS  1.4.1.0R         
SYSIN :                                                             
  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' '),                             
                BUILD=(1:C'A',2:81,80)),                           
         IFTHEN=(WHEN=(81,1,CH,EQ,C' '),                           
                BUILD=(1:C'D',2:1,80)),                             
         IFTHEN=(WHEN=(1,1,CH,NE,C' ',AND,81,1,CH,NE,C' ',AND,     
                       13,68,CH,NE,93,68,CH),                       
                       BUILD=(1:C'U',2:81,80))                     
  SORT FIELDS=(1,12,CH,A),DYNALLOC=(SYSDA,99)                       
  OUTFIL OUTREC=(1,81)                                             
WER164B  19,212K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER164B     0 BYTES RESERVE REQUESTED, 18,528K BYTES USED                     
WER146B  32K BYTES OF EMERGENCY SPACE ALLOCATED                               
WER481I  JOINKEYS REFORMAT RECORD LENGTH=  160, TYPE = F                     
WER257I  INREC RECORD LENGTH =   160                                         
WER110I  SORTOUT  : RECFM=FB   ; LRECL=    81; BLKSIZE= 27945                 
WER074I  SORTOUT  : DSNAME=T.UAT.GIP302DP.R000.CAPS4NE.DELT                   
WER410B  18,628K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
WER410B     0 BYTES RESERVE REQUESTED, 17,988K BYTES USED                     
WER036B  G=25897,B=345                                                       
WER162B  0 PREALLOCATED SORTWORK TRACKS, 2,160 DYNAMICALLY ALLOCATED,         
WER162B     0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 60 TRACKS US
WER045C  END SORT PHASE                                                       
WER405I  SORTOUT  :  DATA RECORDS OUT      20350; TOTAL RECORDS OUT      20350
WER493I  ZIIP PROCESSOR USED                                                 
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000                                 
WER416B  OUTFIL WAS USED FOR SORTOUT                                         
WER416B  SORTWK01 : EXCP'S=2,UNIT=3390,DEV=86CA,CHP=E5DBEBD9BF,VOL=TPUB54     
WER416B  SORTWK02 : EXCP'S=2,UNIT=3390,DEV=81CA,CHP=E5DBEBD9BF,VOL=TPUB52   
WER416B  TOTAL OF 4 EXCP'S ISSUED FOR SORTWORKS                             
WER246I  FILESIZE 3,256,000 BYTES                                           
WER054I  RCD IN      20350, OUT      20350                                   
WER072I  EQUALS, BALANCE IN EFFECT                                           
WER169I  RELEASE 1.4 BATCH 0520 TPF LEVEL 1.0                               
WER482I  JNF1 STATISTICS                                                     
WER483B  2,524K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER483B     0 BYTES RESERVE REQUESTED, 2,744K BYTES USED                     
WER108I  SORTJNF1 : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920               
WER073I  SORTJNF1 : DSNAME=Q.UAT.GIP302DP.R140.CAPS4NE.FULL4.G0027V00       
WER483B  1,936K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
WER483B     0 BYTES RESERVE REQUESTED, 2,224K BYTES USED                     
WER483B  G=4860,B=674,BIAS=00                                               
WER483B  0 PREALLOCATED SORTWORK TRACKS, 150 DYNAMICALLY ALLOCATED,         
WER483B     0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 34 TRACKS U
WER484I  SORTJNF1 : RCD IN= 20350,OMITTED= 0,PAIRED= 20350,UNPAIRED= 0       
WER416B  BSAM WAS USED FOR SORTJNF1                                         
WER416B  JNF1WK01 : EXCP'S=4,UNIT=3390,DEV=90CA,CHP=DAEDEEDEDFEF,VOL=TPUB56   
WER416B  JNF1WK02 : EXCP'S=5,UNIT=3390,DEV=9897,CHP=DAEDEEDEDFEF,VOL=TPUB92   
WER416B  TOTAL OF 9 EXCP'S ISSUED FOR SORTWORKS                               
WER487I  FILESIZE 1,628,000 BYTES                                             
WER482I  JNF2 STATISTICS                                                     
WER483B  2,524K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,           
WER483B     0 BYTES RESERVE REQUESTED, 2,744K BYTES USED                     
WER108I  SORTJNF2 : RECFM=FB   ; LRECL=    80; BLKSIZE= 27920                 
WER073I  SORTJNF2 : DSNAME=Q.UAT.GIP302DP.R140.CAPS4NE.FULL4.G0028V00         
WER483B  1,936K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,     
WER483B     0 BYTES RESERVE REQUESTED, 2,224K BYTES USED                     
WER483B  G=10882,B=333,BIAS=50                                               
WER483B  0 PREALLOCATED SORTWORK TRACKS, 150 DYNAMICALLY ALLOCATED,           
WER483B     0 ACQUIRED IN SECONDARY EXTENTS, 0 RELEASED, TOTAL OF 32 TRACKS US
WER484I  SORTJNF2 : RCD IN= 20350,OMITTED= 0,PAIRED= 20350,UNPAIRED= 0       
WER416B  BSAM WAS USED FOR SORTJNF2                                           
WER416B  JNF2WK01 : EXCP'S=4,UNIT=3390,DEV=80CA,CHP=E5DBEBD9BF,VOL=TPUB50     
WER416B  JNF2WK02 : EXCP'S=3,UNIT=3390,DEV=86CB,CHP=E5DBEBD9BF,VOL=TPUB55     
 WER416B  TOTAL OF 7 EXCP'S ISSUED FOR SORTWORKS                               
 WER487I  FILESIZE 1,628,000 BYTES                                             
 WER052I  END SYNCSORT - TSOMMAKK,STEP01,,DIAG=AC00,EB58,80B2,A4DD,E54E,48E3,062
 WER052I  DIAG1=AC00,6294,80B4,68CC,E54A,488B,0620,4660                         
 WER052I  DIAG2=CA00,4094,E2B4,686E,834A,6C8B,2220,4660                         
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Jun 17, 2013 10:58 pm    Post subject: Reply to: Regd MAXSORT technique in syncsort
Reply with quote

JOINKEYS does a SORT unless you tell it not to.

The input to you "main task" is therefore already sorted on 1,12.

It would not surprise me if your input data is also already in sorted order, but you'd have to verify.

You process all the mismatches, which is fine, but you don't process all the matches, only when data has changed.

Within SyncSort I'd be inclined towards something like this, after the REFORMAT:

Code:

   OMIT COND=(1,80,CH,EQ,81,80,CH)
   SORT FIELDS=COPY                       
   INREC IFOUTLEN=81,
         IFTHEN=(WHEN=(1,1,CH,EQ,C' '),                               
                BUILD=(1:C'A',2:81,80)),                             
         IFTHEN=(WHEN=(81,1,CH,EQ,C' '),                             
                BUILD=(1:C'D',2:1,80)),                               
         IFTHEN=(WHEN=NONE,                         
                       BUILD=(1:C'U',2:81,80))                       


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 ",".
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Syncsort version supporting FINDREP c... juares castro SYNCSORT 9 Tue Aug 09, 2016 6:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us