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

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
ksandy
Beginner


Joined: 27 Mar 2003
Posts: 18
Topics: 11

PostPosted: Mon Jun 09, 2003 10:05 am    Post subject: SORT Reply with quote

Hi

We are using SORT utility at our shop.

1. Is there any formula while specifying space paramter for SORTWK files.
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(5,5))

2.Utility should be using this space internally to sort the file , however is there any timing associated to release this space . Like successful execution of that STEP or entire JOB ????
Can anybody explains this in details.

Thanks in advance
Ksandy
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon Jun 09, 2003 10:19 am    Post subject: Reply with quote

Ksandy,

Are you using DFSORT or Syncsort?
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ksandy
Beginner


Joined: 27 Mar 2003
Posts: 18
Topics: 11

PostPosted: Mon Jun 09, 2003 10:48 am    Post subject: Reply with quote

We are using "EXEC PGM=SORT" .

Ksandy
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon Jun 09, 2003 11:44 am    Post subject: Reply with quote

Ksandy,

EXEC PGM=SORT can be used to invoke either DFSORT or Syncsort. To find out which sort product you have, run the following job (or look at the SYSOUT messages for any job you ran with PGM=SORT):

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
//SORTOUT DD DUMMY
//SYSIN DD *
  SORT FIELDS=COPY
/*


Look at the //SYSOUT messages. If the messages start with ICE (e.g. ICE000I), you are using DFSORT. If the mesages start with WER, you are using Syncsort.

Which are you using?
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ksandy
Beginner


Joined: 27 Mar 2003
Posts: 18
Topics: 11

PostPosted: Mon Jun 09, 2003 3:29 pm    Post subject: Reply with quote

Hi Frank Yaeger

We are using DFSORT at our shop. Thanks for the updates.

Could you please inform me SORTWK files storage space requirements and relevant information .

Ksandy
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Mon Jun 09, 2003 4:45 pm    Post subject: Reply with quote

Ksandy,

The amount of work space needed for a sort with DFSORT depends on many factors. That's why we recommend using dynamic allocation of work data sets rather than JCL SORTWKs. With dynamic allocation, DFSORT will determine the amount of space it needs and divide it up among the number of dynamic work data sets specified or defaulted. Dynamic allocation also allows us to use less work space with Hipersorting or data space sorting. You can use DYNALLOC=(,n) to override the default of n work data sets for dynamic allocation if necessary (the shipped default for n is 4).

If you want to use JCL SORTWKs, the amount of space needed can be roughly based on the input file size. 1.5 to 2 times is a conservative estimate. 1.2-1.5 is usually sufficient. But remember that with JCL SORTWKs, all of the space is allocated before DFSORT gets control, even if it's not all needed. With dynamic allocation of work space, DFSORT can try to allocate what it needs (although we're conservative to ensure that enough work space is available).

A SORTWK DD statement like:

//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(5,5))

creates a temporary data set and is subject to the rules for temporary data sets. If you have a single step, then the system releases the space at the end of the step. If you have multiple steps and you pass the data set between them, then the system releases the space when you delete the temporary data set. DFSORT has nothing to do with releasing the space for JCL SORTWKs.

If you use dynamic allocation of work data sets, DFSORT releases the space when it's done using the data set. So if you have multiple calls to DFSORT within a single step, DFSORT will get and release the dynamically allocated space each time it is called. With multiple calls to DFSORT, using JCL SORTWKs, DFSORT doesn't have anything to do with releasing the space - the system will release the space at the end of the step.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ksandy
Beginner


Joined: 27 Mar 2003
Posts: 18
Topics: 11

PostPosted: Tue Jun 10, 2003 1:42 pm    Post subject: Reply with quote

Hi Frank

This discussion is proving very useful to me . Thanks a lot .

I would like to check with you how should I fine tune , sorting of a huge file , getting used in one of my jcl.

I have a file with 500,000 records , length (1500) and with space attributes CYL(926,185) in one of my job.

So far while sorting this file , I was coding series of SORTWK statements like
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(50,10))
1. Now how can I use DYNALLOC instead of SORTWK statements?
2. Also how can one make sure value of n so as to avoid B37 type problems ?
3. Will this feature , will reduce the CPU time required for successful execution of the sort step ?
4. When I am using SORTWK , i am getting message like
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED:
Is there any relation between space attribute in SORTWK stmts and Tracks informed in above statement?[ 1.2-1.5 times , doesnt seem to be applicable every time ]

Thanks a lot for your help
Ksandy
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Jun 10, 2003 2:34 pm    Post subject: Reply with quote

Ksandy,

1. Remove the //SORTWKdd DD statements. Dynamic allocation will be used automatically, unless your site has changed DFSORT's shipped installation default of DYNAUTO=YES to DYNAUTO=NO. You can use:

Code:

  OPTION DYNALLOC=(,n)


to force dynamic allocation if your site has DYNAUTO=NO, or if you want to override your site's default for n.
2. A back of the envelope calculation says you need about 1300 cylinders of work space for that input file. Depending on how full your work volumes are, you could spread the space over 4 to 8 volumes by setting n to the value you want in DYNALLOC=(,n).
3. Except for small sorts (which is not the case here), dynamic allocation of work data sets and JCL work data sets should have comparable CPU time.
4. The ICE165I shows the tracks allocated and used. With JCL SORTWKs, DFSORT allocates all of the primary space and may allocate secondary space as well if the primary space isn't sufficient. 1.2-1.5. will NOT be applicable every time - it's just a rough estimate. Many factors will determine the exact amount of space needed.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) 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