Chapter Contents

Previous

Next
SAS Companion for the OpenVMS Operating Environment

Estimating the Size of a SAS Data Set

To obtain a rough estimate of how much space you need for a disk-format SAS data set that was created by the V8 engine, follow these steps:

Note:   This procedure is valid only for uncompressed native SAS data files that were created with the V8 engine.  [cautionend]

  1. Use the CONTENTS procedure to determine the size of each observation. (See Using the CONTENTS Procedure to Determine Page Size.)

  2. Multiply the size of each observation by the number of observations.

  3. Add 10 percent for overhead.


Using the CONTENTS Procedure to Determine Page Size

To determine the length of each observation in a Version 8 SAS data set, you can create a Version 8 SAS data set that contains one observation. Then run the CONTENTS procedure to determine the observation length. The CONTENTS procedure displays Engine/Host-Dependent Information, including page size and the number of observations per page for uncompressed SAS data sets. For example, the following input produces a SAS data set plus PROC CONTENTS output:

data oranges;
   input variety $ flavor texture looks;
   total=flavor+texture+looks;
   datalines;
navel 9 8 6
;
proc contents data=oranges;
run;
The output is shown in CONTENTS Procedure Output.

CONTENTS Procedure Output
                          The CONTENTS Procedure

Data Set Name: WORK.ORANGES                       Observations:         1
Member Type:   DATA                               Variables:            5
Engine:        V8                                 Indexes:              0
Created:       10:54 Friday, May 29, 1999         Observation Length:   40
Last Modified: 10:54 Friday, May 29, 1999         Deleted Observations: 0
Protection:                                       Compressed:           NO
Data Set Type:                                    Sorted:               NO
Label:


             -----Engine/Host Dependent Information-----

  Data Set Page Size:         8192
  Number of Data Set Pages:   1
  First Data Page:            1
  Max Obs per Page:           203
  Obs in First Data Page:     1
  Number of Data Set Repairs: 0
  File Name:                  SASDISK:[SASDEMO.SAS$WORK2040F93A]ORANGES.SAS7BDAT
  Release Created:            8.00.00P
  Host Created:               OpenVMS
  File Size (bytes):          16384


           -----Alphabetic List of Variables and Attributes-----

                    #    Variable    Type    Len    Pos
                    -----------------------------------
                    2    flavor      Num       8      0
                    4    looks       Num       8     16
                    3    texture     Num       8      8
                    5    total       Num       8     24
                    1    variety     Char      8     32

To determine page size, the only values that you need to pay attention to are

Observation Length
is the record size in bytes.

Compressed
has the value NO if records are not compressed, and the value YES if records are compressed. (If the records are compressed, do not use the procedure given in Estimating the Size of a SAS Data Set.)


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.