![]() | ![]() | ![]() | ![]() |
When you are in the development stage of a project, it is often important to know how much disk space the production SAS data sets will take up. Knowing the eventual size of the data sets helps you to forecast how much disk space you will need to have available, and prevents you from coming up short. When I want to size my SAS data sets in the Windows, VAX, UNIX and Linux environments, I use a simple SAS macro program that I developed, named size_the_data.sas. This macro program relies on two things:
By specifying the library name, SAS data set name and future number of observations in the program, I can get a projection of the SAS data set's future size. The estimate is specified in both data set pages and total data set bytes. The projection is accurate to within plus-or-minus a single data set page. Macro DetailsProgram Name: Size_The_Data.sas Purpose: This program calculates the future size of a SAS data set, based on its present characteristics and upon the projected number of observations ( Required Parameters:
The Program
|
|
|
Size Calculations From the SIZEDATA Macro SAS Data Library: Q:\Data SAS Data Set: filenams Data Set Projected Projected Observation Projected Number Page Observations Number of Projected Data Set Length of Observations Size Per Page 4 K Pages Size (Bytes) 50 6,104 4096 81 77 315,392 |
Michael says, "I hope that the size_the_data SAS macro program will help you seize the day when estimating the future size of your production SAS data sets!"
About the Author
Michael A. Raithel is a well-known, award-winning SUGI and NESUG speaker and contributor. He is the author of the Books By Users book Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition. A new edition is due out in August! Michael has used SAS software as a consultant and analyst for 17 years.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.