Chapter Contents |
Previous |
Next |
BLKSIZE= |
Default: | 16,384 |
Valid in: | configuration file, SAS invocation, OPTIONS statement, OPTIONS window |
CMS specifics: | all |
Syntax | |
Details | |
Comparison |
Syntax |
BLKSIZE=MIN | MAX | n | nK | nM | nG | hexX |
Details |
BLKSIZE (block size) is a library attribute that is appropriated at the time the library is assigned. The only way to change the value of BLKSIZE for a member in an allocated SAS data library is to specify the BLKSIZE= option in the DATA statement for that member.
By specifying the minimum size of the initial buffer allocated for each SAS data set member, the BLKSIZE= option helps refine the use of storage for SAS files without having to specify the BUFSIZE= and BUFNO= options explicitly. Specifying BLKSIZE= is the equivalent of dynamically setting the value of the BUFNO= option based on the observation length in the data set.
The BLKSIZE= option enables you to designate a constant amount of memory dedicated to obtaining buffers. SAS allocates the number of buffers specified by the BUFNO= option, each the size specified by the BUFSIZE= option, regardless of the value of the BLKSIZE= option. (The BUFNO= and BUFSIZE= options are described later in this section.) The BLKSIZE= option determines the number of extra buffers that can be allocated from the memory that remains (from the number of bytes specified by the BLKSIZE= option) after the number of buffers specified by the BUFNO= option are obtained.
You can determine the number of extra pages (buffers) by making the following calculation:
(block-size - (number-of-buffers* buffer-size ))/ buffer-size |
where block-size is determined by the value of the BLKSIZE= option, number-of-buffers is the value of the BUFNO= option, and buffer-size is the value of the BUFSIZE= option.
For example, suppose you have three members in a library named TEST.A, TEST.B, and TEST.C. A has a page size (specified by the BUFSIZE= option) of 2K; B, 4K; and C, 8K. Assume that BUFNO= is set to 6, and BLKSIZE= is set to 32K (32,768 bytes). SAS not only allocates six 2K buffers to process TEST.A, but in addition it allocates ten extra 2K buffers from the 20K that remains from the 32K area of memory; thus, a "bonus" number of buffers, 16 in all, helps speed up the processing of TEST.A. When processing TEST.B, SAS allocates two extra 4K buffers in addition to the six initial 4K buffers: (32K - (6 * 4K))/4K. When processing TEST.C, SAS allocates the six 8K buffers, as designated by the values of the BUFNO= and BUFSIZE= options, and uses a total of 48K.
By specifying BLKSIZE=32K, you reserve a 32K area of memory that can be used to obtain excess buffers to help improve performance. These excess buffers are in addition to the number of buffers specified by the BUFNO= option. The value of the BLKSIZE= option is ignored for any data sets whose buffer size multiplied by the number of buffers is greater than the BLKSIZE= option value.
Comparison |
The value specified in the BLKSIZE= system option is in effect for an entire session unless it is overridden by the BLKSIZE= option in the LIBNAME statement or the BLKSIZE= data set option.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.