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 

Improve performance of Sort and OMIT COND in the same step?
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Wed May 09, 2007 9:28 am    Post subject: Improve performance of Sort and OMIT COND in the same step? Reply with quote

I have a job which sorts three files into one file. But to do this task it takes almost 55 mins...Will SORTWK files improve the runtime of syncsort????

now I have a requirement to remove particular records while sorting, i.e I have to remove the records which have date other than 20070605 data at position 12.can I code OMIT COND in the same STEP. Pls advice. Any help is greatly appreciated..

Code:

//DE5S1  EXEC PGM=SORT
//****************************************************
//SYSOUT   DD SYSOUT=*                               
//SYSPRINT DD SYSOUT=*                               
//SYSUDUMP DD SYSOUT=*                               
//SORTLIB  DD DSN=SYS1.SORTLIB,DISP=SHR               
//SYSIN    DD DSN=CRR.CNTLCARD(DEMRG),DISP=SHR   
//SORTIN   DD DSN=CRR.C111A.IIS.OFFP(-2),     
//            DISP=SHR                               
//         DD DSN=CRISR.D11A.IIS.OFFP(-2),     
//            DISP=SHR                               
//         DD DSN=CRR.D11A.IIS.OFFP(-2),     
//            DISP=SHR                               
//SORTOUT  DD DSN=AKIL.D11A.SS(+1),         
//            DISP=(NEW,CATLG,CATLG),                 
//            SPACE=(CYL,(1600,250),RLSE),           
//            UNIT=SYSDA,                             
//            RECFM=VB,LRECL=2004

DEMRG:
 SORT FIELDS=(4,8,CH,A,76,3,CH,A,73,3,CH,A,79,7,CH,A)
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: Wed May 09, 2007 9:54 am    Post subject: Reply with quote

vak255,

Try this

Code:

//SYSIN  DD *
  OPTION DYNALLOC=(SYSDA,5)

  INCLUDE COND=(12,08,CH,EQ,C'20070605') 

  SORT FIELDS=(04,08,CH,A,
               76,03,CH,A,
               73,03,CH,A,
               79,07,CH,A)
/*


And your JCL should be as simple as this

Code:

//DE5S1    EXEC PGM=SORT
//SORTLIB  DD DSN=SYS1.SORTLIB,
//            DISP=SHR
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=CRR.C111A.IIS.OFFP(-2),
//            DISP=SHR
//         DD DSN=CRISR.D11A.IIS.OFFP(-2),
//            DISP=SHR
//         DD DSN=CRR.D11A.IIS.OFFP(-2),
//            DISP=SHR
//SORTOUT  DD DSN=AKIL.D11A.SS(+1),
//            DISP=(NEW,CATLG,CATLG),
//            SPACE=(CYL,(1600,250),RLSE),
//            UNIT=SYSDA
//SYSIN    DD DSN=CRR.CNTLCARD(DEMRG),
//            DISP=SHR
/*


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
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Thu May 10, 2007 12:51 am    Post subject: Reply with quote

Thanks Kolusu.
Back to top
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Thu May 10, 2007 12:52 am    Post subject: Reply with quote

Thanks Kolusu. I will try and let you know.


Quote:

OPTION DYNALLOC=(SYSDA,5)


is this allocates workfiles?
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: Thu May 10, 2007 5:14 am    Post subject: Reply with quote

what does the sort manual say?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
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: Thu May 10, 2007 5:17 am    Post subject: Reply with quote

vak255,

You know you would learn more if you had that investigated yourself. A simple search for DYNALLOC in any sort manual and you would have found the answer yourself. I specifically did not explain everything as I want you also to do some legwork. Trust me you will learn a lot

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


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Thu May 10, 2007 8:00 am    Post subject: Reply with quote

Yes, I agree with you all. Sure I will refer to the manual.

Thanks a lot.
Back to top
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Mon May 21, 2007 2:02 pm    Post subject: Reply with quote

Hi,

I have tried with and without the below option, for both the cases I am getting the same results i.e the Job is taking same time to complete...almost 45mins.
Quote:

OPTION DYNALLOC=(SYSDA,5)


Is there a way to optimize this to reduce the runtime. Is there any optimization manual available?
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 May 21, 2007 2:04 pm    Post subject: Reply with quote

Quote:

I have tried with and without the below option, for both the cases I am getting the same results i.e the Job is taking same time to complete


vak255,

Are the input files on tape? when you say 45 minutes , is it the CPU time or the elapsed time?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nic Clouston
Advanced


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

PostPosted: Mon May 21, 2007 2:09 pm    Post subject: Reply with quote

1600 cyls prime allocation and 250 secondary. Must be really big files so no wonder it takes a long time. How many records are involved? It may not help but have you tried extracting the records by processing each file in separate steps and then merging the 3 extracts together?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Mon May 21, 2007 3:07 pm    Post subject: Reply with quote

Kolusu and NIC, Yes you are right they are really huge files on tape and sometimes on DASD - depends on the region.

45 mins is the total runtime. Its not just CPU time. I will let you know the CPU time and elapsed time asap.

If you have any optimization tips for saving CPU time on this? please pass it on. I appreciate all your help guys.
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Mon May 21, 2007 3:22 pm    Post subject: Reply with quote

You'll save more by giving a larger REGION and SIZE value because in-memory sort activity is way faster than any number of SORTWKs.

Check your WER164B msgs to see what SIZE was used and see if you can increase it using SIZE= in the PARM.
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Mon May 21, 2007 4:02 pm    Post subject: Reply with quote

I will try and will let you know Bill. Thanks
Back to top
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Mon May 21, 2007 4:06 pm    Post subject: Reply with quote

I changed the input file for quick testing and also ran STROBE for the step.

Quote:

CPS TIME PERCENT - 15.89
WAIT TIME PERCENT - 84.11
RUN MARGIN OF ERROR PCT - 2.30
CPU MARGIN OF ERROR PCT - 5.77
TOTAL SAMPLES TAKEN - 3,813
TOTAL SAMPLES PROCESSED - 1,812
INITIAL SAMPLING RATE- 16.67/SEC
FINAL SAMPLING RATE - 4.17/SEC

SESSION TIME - 8 MIN 4.08 SEC
CPU TIME - 0 MIN 30.63 SEC
WAIT TIME - 2 MIN 42.08 SEC
STRETCH TIME - 4 MIN 51.36 SEC



Here I see wait time accts to 84 percent, can anyone help me in understanding this report as I am new to STROBE and unfortunately i don't have STROBE manual to refer to...
I am guessing why its 84% of wait time.
Back to top
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Mon May 21, 2007 4:10 pm    Post subject: Reply with quote

pls find below the WER27B details:

Quote:

WER276B SYSDIAG= 74056, 560834, 560834, 1190831
WER164B 102,436K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 102,384K BYTES USED
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 1, 2  Next
Page 1 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