Date: Wed, 6 Aug 2003 10:00:35 -0400
Reply-To: Michael Raithel <RAITHEM@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Michael Raithel <RAITHEM@WESTAT.COM>
Subject: Re: Calculating the optimum block size
Kirstpi posted the following:
> When creating data sets with fixed-length blocks, I want to
> calculate the optimum block size to use. I have been using
> the following formula courtesy of Michael Raithel.
> 1.Choose the maximum half-a-track(two blocks per track) block
> size. Call this "Blocksize Target Number". 2.Records per
> block=Blocksize Target Number / LRECL 3.Round the value of
> the Records per block down to the nearest integer. 4.Optimum
> block size=Recs per block * LRECL
> For this formula the suggestion of Michael is to use
> Blocksize Target Number of 27998. I have now found some other
> documentation in a JCL book pointing at using 27648 and some
> at 27920. Does anybody have any experience in this matter?
Kirstpi, you have essentially already heard from me, but I guess that I was
not sufficiently clear. Perhaps I can clarify this matter a bit more...
What we are trying for, here, is half-track blocking on IBM (and IBM-clone)
3390 DASD on that most august of operating systems OS/390 (MVS, MVS/XA,
MVS/ESA, or z/OS). The algorithm, above, (found in Chapter 7, Efficient
Processing of Sequential Data Sets, of my book) which uses 27998 bytes, is
for computing the block size of _NON_SAS_ flat files on OS/390. 27998 is
the total amount of bytes in half-a-track of a 3390 DASD. So, this formula
should put you in great stead for efficient flat file storage and
The 27648 value is the half-track block value for SAS DATA SETS. The SAS
System allocates SAS data sets in multiples of 512 bytes. The highest
number of whole 512-byte multiples that you can get into half-a-track of
3390 DASD is: 54. (27998 / 512 = 54). If you then multiply 54 x 512, you
get 27648. (54 x 512 = 27648). So, the 27648 half-track block size
promotes the most efficient storage and processing of large SAS data sets.
Color me clueless about the 27920 block size! It falls between the magic
numbers of 18453 bytes and 27998 bytes, so a data set allocated at this
block size will still be blocked at half-a-track. However, it is wasting 78
bytes (27998 - 27920 = 78) per half track and 156 bytes (2 x 78 = 156) per
track. (Is that a big deal or not--well that is a _LARGE_ discussion that I
will avoid here). 27920 is a most strange block size; it is not an even
multiple of either 512 or 1024, the usual IT suspects when it comes to
denominator. So, what could possibly be the deal with that number? That
block size is wondrously strange to me.
Kirstpi, I hope that I have helped to clear some of this up for you. If
not, be sure to read the replies by other SAS-L mainframe sharpies!
Best of luck to you in your quest to do the right thing and embrace
half-track blocking while working in the throne room of the operating system
I hope that this suggestion proves helpful now, and in the future!
Of course, all of these opinions and insights are my own, and do not reflect
those of my organization or my associates. All SAS code and/or methodologies
specified in this posting are for illustrative purposes only and no warranty
is stated or implied as to their accuracy or applicability. People deciding
to use information in this posting do so at their own risk.
Michael A. Raithel
"The man who wrote the book on performance"
Author: Tuning SAS Applications in the MVS Environment
Efficiency is intelligent laziness. - David Dunham