The Anatomy of a SAS Dataset: Understanding Metadata, Engines, and Storage Models

This code is also available in: Deutsch Español Français
Difficulty Level
Beginner
Published on :
Michael

Expert Advice

Michael
Responsable de l'infrastructure Viya.

By default, PROC CONTENTS lists variables alphabetically, which can confuse the logical flow of the dataset; use the VARNUM option (e.g., proc contents data=sashelp.air varnum;) to list variables in their physical creation order (logical position), which is often essential for understanding how the data was assembled.

A SAS dataset is more than just a spreadsheet—it is an intelligent container.
This document explains what a SAS© dataset is, describing it as a tabular set of data stored in a SAS© file format, including both data values and metadata (descriptive information). It details how the SAS© V9 and SAS© Scalable Performance Data Engine (SPD Engine) manage the storage of this information. Furthermore, it shows how to view SAS© dataset metadata using the CONTENTS procedure or the CONTENTS statement within the DATASETS procedure, and mentions the addition of sort information to the metadata when the dataset is sorted.
Data Analysis

Type : SASHELP


The examples use data from the SASHELP library, a data library integrated with SAS.

1 Code Block
PROC CONTENTS
Explanation :
This example uses the CONTENTS procedure to display the descriptor information (metadata) of the SASHELP.AIR dataset. This procedure provides details such as the dataset name, creation date, number of observations and variables, and the attributes of each variable.
Copied!
1PROC CONTENTS DATA=sashelp.air;
2RUN;
Pro Tip
While the standard V9 engine keeps data and metadata in one .sas7bdat file, the SPD Engine (mentioned in your text) separates them into different files for parallel processing performance.
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : Copyright © SAS Institute Inc. All Rights Reserved


Related Documentation

Aucune documentation spécifique pour cette catégorie.