Chapter Contents

Previous

Next
SAS Companion for the OS/390 Environment

Estimating the Size of a SAS Data Set

Under OS/390, a non-HFS SAS data library is a single file that contains the library's SAS data sets. You cannot obtain information from the file system on how large each member SAS data set is.

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

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

  1. Using the CONTENTS procedure, specify the DIRECTORY option and using the DATA option to specify the SAS library member.

  2. Using the output of the CONTENTS procedure, divide the Data Set Page Size statistic for the SAS library member by the Blocksize statistic for the directory to obtain the number of blocks per page.

  3. Multiply the number of blocks per page by the Number of Data Set Pages statistic for the SAS library member to obtain the number of blocks.

  4. Increase the number of blocks by 5% to account for overhead associated with the library directory control structures associated with the SAS library member.

  5. Divide the increased number of blocks by the Blocks Per Track statistic for the directory, then round up to the nearest whole track.

Note:   

  [cautionend]

To determine the rough size in bytes of the allocation needed for a SAS library member, follow these steps:

  1. Run the CONTENTS procedure using the DATA option to specify the SAS library member.

  2. Using the output of the CONTENTS procedure, multiply the Pagesize value for the SAS library member by the number of pages for the member to obtain a number of bytes.

  3. Increase the number of bytes by 5% to account for overhead associated with the library directory control structures associated with the library member.

For additional information about estimating the size of a SAS data set, see Tuning SAS Applications in the MVS Environment, by Michael Raithel. This book is available from SAS Institute as part of the Books by Users program.


Using the CONTENTS Procedure to Determine Observation Length

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;
cards;
navel 9 8 6 ;
proc contents data=oranges; 
run;

The output is shown in CONTENTS Procedure Output.

CONTENTS Procedure Output
                               The SAS System                           1
                                   The CONTENTS Procedure
     Data Set Name: WORK.ORANGES                        Observations:         1
     Member Type:   DATA                                Variables:            4
     Engine:        V8                                  Indexes:              0
     Created:       14:27 Tuesday, March 5, 1999        Observation Length:   32
     Last Modified: 14:27 Tuesday, March 5, 1999        Deleted Observations: 0
     Protection:                                        Compressed:           NO
     Data Set Type:                                     Sorted:               NO
     Label:


                       -----Engine/Host Dependent Information-----
            Data Set Page Size:         6144            
            Number of Data Set Pages:   1
            First Data Page:            1
            Max Obs per Page:           139
            Obs in First Data Page:     4
            Number of Data Set Repairs: 0
            Physical Name:              SYS96065.T142625.RA000.USERID.R0000180
            Release Created:            7.0000B2
            Release Last Modified:      7.0000B2
            Created by:                 USERID
            Last Modified by:           USERID
            Subextents:                 1
            Total Blocks Used:          1

                 -----Alphabetic List of Variables and Attributes-----
#    Variable    Type    Len    Pos   Format      Informat   Label
-----------------------------------------------------------------------------------
2    FLAVOR      Num       8      8                          
4    LOOKS       Num       8     24                          
3    TEXTURE     Num       8     16                          
1    VARIETY     Char      8      0   

The only values that you need to pay attention to are Observation Length and Compressed:

Observation Length
is the record size in bytes.

Compressed
has the value NO if records are not compressed; it has 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.