O'Reilly logo

Step-by-Step Programming with Base SAS 9.4 by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Requesting Contents Information about SAS Data Sets

Using the DATASETS Procedure for SAS Data Sets

To look at the contents of a SAS data set without displaying the observations, use the CONTENTS statement in the DATASETS procedure. The CONTENTS statement and its options provide descriptive information about data sets and a list of variables and their attributes.

Listing the Contents of One Data Set

The SAS library USCLIM contains four data sets. The data set TEMPCHNG contains data for extreme changes in temperature. The following program displays the variables in the data set TEMPCHNG:
proc datasets library=usclim memtype=data;
   contents data=tempchng;
run;
The output from the CONTENTS statement produces information about the TEMPCHNG data ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required