View previous topic :: View next topic
|
Author |
Message |
ilakkia Warnings : 1 New User
Joined: 17 May 2008 Posts: 28 Location: chennai
|
|
|
|
I have two tape files each containing 8,000,000 records.
Record Length is 4000. Record format is FB.
I need to sort the two files with respect to account numbers in
position 1 to 8.
I have the sort card to be used, which will take the form
SORT FIELDS = (1,8,CH,A).
My problem is the number of sort work space datasets to use.
The sortwork datasets should use must take the below form.
SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,900),DSNTYPE=LARGE
I also need the general method to find and fix the number of sortwork space if the record count is known. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
I use this formula:
((Record count * 1.5) * Record size)) = total sortwork alloc in bytes
Convert bytes back to CYLS based on your DASD type.
If the total sortwk space is too large, this could also be an opportunity to use SyncSort MAXSORT which can break the total sort into smaller sort/merge phases based on your specified breakpoint sizes. Consult the product manuals. |
|
Back to top |
|
|
Guru Bob
New User
Joined: 31 Jan 2008 Posts: 21 Location: Malaysia
|
|
|
|
Wow so easy.
Get the size of the two input files 16M records at 4000 bytes = 12 records per TRACK. I am assuming 3390 device type.
your input file size is 88,889 cylinders.
You need 124,444 CYLS of SORTWK hence need 62 SORTWKs coded at 2000 cylinders each
I also assume you have coded EXEC PGM=SORT,PARM='BMSG,ELAP,VSCORET=64MB' or added //$ORTPARM for the same parms?
to make the sort run faster - have you also coded the parameter to read both carts at once? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Guru Bob,
I'm curious to know how you read 2 carts at once.
Gerry |
|
Back to top |
|
|
Guru Bob
New User
Joined: 31 Jan 2008 Posts: 21 Location: Malaysia
|
|
|
|
You can if using SYNCSORT
Unfortunately a HARD drive crash has lost my SYNCSORT manual so I cannot remember the exact parameter no I had to go retrieve another manual from the WEB. But it tells SYNCSORT to mount tapes on multiple volumes and read together. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Guru Bob,
maybe I'm being picky or I'm asking a dumb question, but surely it's still reading 1 record at a time.
Gerry |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
If you code your JCL as UNIT=(TAPE,2) then two volumes will be mounted. This eliminates the delay of rewind, unload time when switching physical tapes. It's still reading one tape at a time. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Bill Dennis wrote: |
It's still reading one tape at a time. |
While this is true for a standard sort, PARASORT allows you to read more than one at a time. PARASORT is fully documented in Chapter 10 of the SyncSort for z/OS Programmer's Guide.
Guru Bob wrote: |
Unfortunately a HARD drive crash has lost my SYNCSORT manual |
Bob, contact me offline I'd be happy to help you out. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Bill,
Quote: |
If you code your JCL as UNIT=(TAPE,2) then two volumes will be mounted. This eliminates the delay of rewind, unload time when switching physical tapes. It's still reading one tape at a time.
|
There are 2 files involved and the above will only work if either file is a multi volume dataset.
Gerry |
|
Back to top |
|
|
Guru Bob
New User
Joined: 31 Jan 2008 Posts: 21 Location: Malaysia
|
|
|
|
PARASORT is the correct parameter under SYNCSORT and is designed for multi volume cart files. |
|
Back to top |
|
|
|