Posted: Mon Jun 09, 2003 10:05 am Post subject: SORT
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.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jun 09, 2003 10:19 am Post subject:
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
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jun 09, 2003 11:44 am Post subject:
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):
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
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jun 09, 2003 4:45 pm Post subject:
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
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 ]
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Jun 10, 2003 2:34 pm Post subject:
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
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