MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DFSORT report with total and subtotal
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
balaryan
Beginner


Joined: 10 Mar 2017
Posts: 13
Topics: 2
Location: Boston

PostPosted: Fri Mar 17, 2017 3:03 pm    Post subject: Reply with quote

kolusu wrote:

Now I would like to check the CPU times for COBOL solution and SORT solution

Yeah.. Very much impressed with DFSORT performance. It took less than a minute with the total of 0.90 min for both steps which is four times faster than COBOL program. Initially, I presumed this SORT will take more time than CBL. But it broke my assumptions well.
_________________
B@L@
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Mon Mar 20, 2017 7:02 pm    Post subject: Reply with quote

Balaryan,

I took a second look at this and optimized this job a bit more. Try this and let me know


Code:

//STEP0100 EXEC PGM=SORT                                           
//SYSOUT   DD SYSOUT=*                                             
//SORTIN   DD DISP=SHR,DSN=Your Input FB 40 byte file           
//SORTOUT  DD DSN=&&SUMMARY,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)     
//PADRECD  DD DSN=&&PADRECD,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)     
//SYSIN    DD *                                     
  OPTION COPY                                                         
  INREC BUILD=(1,4,                                      $ STORE     
               6,2,                                      $ REGION     
               X,                                                     
               9,1,CHANGE=(5,C'Y',C'10101',                           
                             C'N',C'01011'),                         
                  NOMATCH=(C'00000'))                                 
                                                                     
  OUTFIL REMOVECC,NODETAIL,                                           
  BUILD=(60X),                                                       
  SECTIONS=(1,7,                                                     
  TRAILER3=(1,7,                                                     
            X,                                                       
            TOT=(08,1,ZD,EDIT=(III,IIT)),                             
            X,                                                       
            TOT=(09,1,ZD,EDIT=(III,IIT)),                             
            X,                                                       
            TOT=(10,1,ZD,EDIT=(III,III,IIT)),                         
            X,                                                       
            TOT=(11,1,ZD,EDIT=(III,III,IIT)),                         
            X,                                                       
            TOT=(12,1,ZD,EDIT=(III,III,IIT))))                       
                                                                     
  OUTFIL FNAMES=PADRECD,                                             
  REMOVECC,NODETAIL,BUILD=(60X),                                     
  SECTIONS=(1,4,                                                     
  TRAILER3=(1,4,C' 1 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C' 2 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C' 3 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C' 4 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C' 5 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C' 6 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C' 7 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C' 8 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C' 9 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C'10 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C'11 ',X,2C'      0 ',3C'          0 ',/,             
            1,4,C'12 ',X,2C'      0 ',3C'          0 '))             
                                                                     
//*                                                                   
//STEP0200 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN01 DD DSN=&&SUMMARY,DISP=SHR                                 
//SORTIN02 DD DSN=&&PADRECD,DISP=SHR                                 
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  MERGE FIELDS=(01,7,CH,A),EQUALS                                     
  SUM FIELDS=NONE                                                     
                                                                     
  OUTREC IFTHEN=(WHEN=INIT,                                           
          BUILD=(03:01,4,                       $ STORE #             
                 16:05,3,UFF,EDIT=(TTT),        $ REGION             
                 28:05,3,JFY=(SHIFT=LEFT,                             
                              LEAD=C'SUB-DIV',                       
                              LENGTH=20),                             
                 62:09,7,                                             
                 81:01,7,                                             
                 89:SEQNUM,6,ZD,RESTART=(1,4),                       
                 97:17,44)),                                         
                                                                     
  IFTHEN=(WHEN=(89,6,ZD,GT,1),                                       
       OVERLAY=(03:4X))                                               
                                                                     
  OUTFIL REMOVECC,IFOUTLEN=80,                                         
  IFTHEN=(WHEN=(97,7,UFF,GT,0),                                       
  BUILD=(01:01,52,                                                     
         53:C'Y',                                                     
         54:54,27,/,                                                   
         07:07,45,                                                     
         53:C'N',                                                     
         62:97,7)),                                                   
                                                                       
  HEADER2=(/,'REPORT                         TOTAL REPORT',           
           '               PGM-NAME : DFSORT',/,                       
           'RUN DATE - ',DATE,60:'PAGE ',PAGE,/,/,                     
           'FIELD#1     FIELD#2        FIELD#3',                       
           '                FIELD#4      FIELD#5',/),                 
                                                                       
  SECTIONS=(81,4,                                                     
  TRAILER3=(/,                                                         
            17:'TOTAL STORE ',81,4,' INBOUND ITEMS  = ',               
               TOT=(105,11,UFF,EDIT=(III,III,IIT)),/,                 
            17:'TOTAL STORE ',81,4,' OUTBOUND ITEMS = ',               
               TOT=(117,11,UFF,EDIT=(III,III,IIT)),/,                 
            17:'TOTAL STORE ',81,4,' ITEMS          = ',               
               TOT=(129,11,UFF,EDIT=(III,III,IIT)),/)),               
  TRAILER1=(/,                                                         
            02:'INVENTORY INBOUND GRAND TOTAL    =',                   
               TOT=(105,11,UFF,EDIT=(III,III,IIT)),/,                 
            02:'INVENTORY OUTBOUND GRAND TOTAL   =',                   
               TOT=(117,11,UFF,EDIT=(III,III,IIT)),/,                 
            02:'INVENTORY GRAND TOTAL            =',                   
               TOT=(129,11,UFF,EDIT=(III,III,IIT)),/)                 
                                                                       
//*

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
balaryan
Beginner


Joined: 10 Mar 2017
Posts: 13
Topics: 2
Location: Boston

PostPosted: Tue Mar 21, 2017 3:10 pm    Post subject: Reply with quote

Kolusu,

I tested the latest solution and found the earlier one is quicker than latter.
Solution #1 : 0.90 min
Solution #2 : 1.25 min
_________________
B@L@
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Mar 21, 2017 4:16 pm    Post subject: Reply with quote

Is that elapsed time or cpu time?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
balaryan
Beginner


Joined: 10 Mar 2017
Posts: 13
Topics: 2
Location: Boston

PostPosted: Mon Mar 27, 2017 10:40 am    Post subject: Reply with quote

Nic Clouston wrote:
Is that elapsed time or cpu time?


Nic, Its CPU time.
_________________
B@L@
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group