Chapter Contents |
Previous |
Next |
CACHESIZ= |
Language element: | data set option |
Default: | 65024 |
Engines: | V6, V7, V8 |
Valid as: | data set option, engine or host option |
OpenVMS specifics: | All aspects are host-specific |
Syntax | |
Details | |
Comparisons | |
See Also |
Syntax |
CACHESIZ=integer |
Details |
Pages of SAS files are cached in memory with each cache containing multiple pages. The CACHESIZ= data set option controls the size (in bytes) of the data cache used to buffer the I/O pages. Note that memory is consumed for each data cache, and multiple caches are used for each data set opened. Thus, the disadvantage of specifying extremely large CACHESIZ= values is large consumption of memory. The advantage of a larger CACHESIZ= value is that it reduces the actual number of disk I/Os required to read from or write to a file. For example, if you are reading a large data set, you can use the following statements:
libname test v8 '[mydir]'; data new; set test.big(cachesiz=65024); . . . more data lines . . . run;
This DATA step reads the TEST.BIG data set in the most efficient manner.
If a data cache is used, then one disk I/O is the size of the CACHESIZ= value. If no data cache is allocated, then one disk I/O is the size of the BUFSIZE= value. The size of the page is controlled with the BUFSIZE= data set option.
Comparisons |
For example, if you specify BUFSIZE=65024 and CACHESIZ=0, I/O is performed in increments of the page size. If the data actually require only 32,000 bytes of storage, then more than half the space allocated for the file is unused. If you specify BUFSIZE=32768 and CACHESIZ=65024, I/O is still performed in increments of 65,024 bytes; however, if the data require only 32,000 bytes, little space is wasted.
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.