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 

Sort Vs ISRSUPC (3.13) Compare

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon Jun 21, 2004 12:40 am    Post subject: Sort Vs ISRSUPC (3.13) Compare Reply with quote

Hi,

I found something very interesting in Sort. I was trying to compare two huge files (each containing 2.5 Million records) using 3.13 (ISRSUPC- Batch) compare. My job ran for 47 minutes (CPU Time was 00:12:12:36).

Later I compared the same files using SORT (SYNCTOOL).

Code:

//STEP001 EXEC PGM=SYNCTOOL                                       
//TOOLMSG DD SYSOUT=*                                             
//DFSMSG  DD SYSOUT=*                                             
//IN1     DD DSN=INPUT FILE 1,DISP=SHR         
//IN2     DD DSN=INPUT FILE 2,DISP=SHR         
//OUT1    DD DSN=OUTPUT FILE 1 - INSERTS,                         
//             DISP=(,CATLG,DELETE),                             
//             UNIT=3490,                                         
//             DATACLAS=TMM10,                                   
//             VOLUME=(,RETAIN),                                 
//             LABEL=RETPD=120,                                   
//             DCB=(DLJ.MODLDSCB)                                 
//OUT2    DD DSN=OUTPUT FILE 2 - DELETES,                         
//             DISP=(,CATLG,DELETE),                             
//             UNIT=3490,                                         
//             DATACLAS=TMM10,                                   
//             VOLUME=(,RETAIN),                                 
//             LABEL=RETPD=120,                                   
//             DCB=(DLJ.MODLDSCB)                                 
//TEMP1DS DD DSN=&&T1,DISP=(,PASS),SPACE=(CYL,(900,100),RLSE)     
//TEMP2DS DD DSN=&&T2,DISP=(,PASS),SPACE=(CYL,(900,100),RLSE)         
//CONCAT  DD DSN=&&T1,DISP=SHR,VOL=REF=*.TEMP1DS                       
//        DD DSN=&&T2,DISP=SHR,VOL=REF=*.TEMP2DS                       
//TOOLIN  DD *                                                         
     COPY FROM(IN1) TO(TEMP1DS) USING(CTL1)                           
     COPY FROM(IN2) TO(TEMP2DS) USING(CTL2)                           
     SORT FROM(CONCAT) USING(CTL3)                                     
//CTL1CNTL DD *                                                       
     OUTREC FIELDS=(1,4,C'1',5,537),CONVERT                                   
//CTL2CNTL DD *                                                       
     OUTREC FIELDS=(1,4,C'2',5,537),CONVERT                                   
//CTL3CNTL DD *                                                       
    SORT FIELDS=(6,56,CH,A,66,24,CH,A,91,452,CH,A)                     
    SUM FIELDS=(5,1,ZD)                                               
    OUTFIL FNAMES=OUT1,INCLUDE=(5,1,CH,EQ,C'1'),OUTREC=(1,4,6,537)     
    OUTFIL FNAMES=OUT2,INCLUDE=(5,1,CH,EQ,C'2'),OUTREC=(1,4,6,537)     
/*                                                                     


The input files are of VB & LRECL=541. I included a constant at the beginning of the file @ Position 5 (after RDW). The fields that need to be masked was excluded from the SORT criteria.

Surprisingly the SORT solution completed in just 2 Mins 27 seconds with CPU time - 00:00:21:21.

Questions:
1. Why is so much difference b/w Sort and ISRSUPC as far as the runtime or CPU Utilization? Could someone explain me the pros & cons between these 2 solutions. The disadvantage that I see in SORT is the amount of storage required by Temp. datasets (which is going to be only for a short period though).

I think everything that is done via ISRSUPC can be done in SORT also. Please confirm.

2. As mentioned above, I am working with VB files. My above solution with convert the VB files to FB while I create the TEMP files (while adding the constant char '1' / '2'). Is there any way to include a new column inside a VB dataset without changing it to FB ?

Thanks in advance for your help and support.
Phantom.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Jun 21, 2004 5:07 am    Post subject: Reply with quote

Phantom,

Sort routines use highly optimized I/O routines, and hence the Sort solution would use less CPU and EXCP's than SuperC/CE. You can do more with SORT than with SuperC/CE.

You can add a constant at the beginning and you don't have to convert it to FB file. just specify the starting position (here 5). You might run into a problem if you have short records.

Code:

//CTL1CNTL DD *     
     OUTREC FIELDS=(1,4,C'1',5)
//CTL2CNTL DD *     
     OUTREC FIELDS=(1,4,C'2',5)


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Jun 22, 2004 6:29 am    Post subject: Reply with quote

Thanks a lot for the explanation kolusu,

Quote:

You can do more with SORT than with SuperC/CE.


Could you please point some examples or links for this, kolusu.

Thanks a bunch - Phantom
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Jun 22, 2004 7:13 am    Post subject: Reply with quote

Phantom,

Sort is a powerful tool, when compared to SuperC/CE in sense that it allows to format the records(change,reformat packed decimal values...) and write out to different files. And superce has a limitation of output listing dataset which if I remember correctly is 207 only bytes.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Jun 22, 2004 10:10 am    Post subject: Reply with quote

Oh okay. Now I got what you were trying to say kolusu. And as you said superce has a limitation of output listing (176 columns of the input dataset - total length of 202 bytes).

Thanks,
Phantom
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
Page 1 of 1

 
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