CONTENTS Procedure

Example 3: Describing a SAS Data Set

Features:

CONTENTS statement option: DATA=

Other features:

SAS data set option: READ=

This example shows the output from the CONTENTS statement for the GROUP data set. The output shows the modifications made to the GROUP data set in Modifying SAS Data Sets.
options pagesize=40 linesize=80 nodate pageno=1;

LIBNAME health
'SAS-library';
Specify HEALTH as the procedure input library, and suppress the directory listing.
proc datasets library=health nolist;
Create the output data set GRPOUT from the data set GROUP. Specify GROUP as the data set to describe, give read access to the GROUP data set, and create the output data set GRPOUT, which appears in The OUT= Data Set.
   contents data=group (read=green) out=grpout;
   title  'The Contents of the GROUP Data Set';
run;
Contents of the Group Data Set – View 1
Group Data Set – View 2
Group Data Set – View 3