DATASETS Procedure

Example 5: Describing a SAS Data Set

Features:

CONTENTS statement option: DATA=

Other features:

SAS data set option: READ=

Details

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.

Program

options pagesize=40 linesize=80 nodate pageno=1;
LIBNAME health
'SAS-library';
proc datasets library=health nolist;
   contents data=group (read=green) out=grpout;
   title  'The Contents of the GROUP Data Set';
run;

Program Description

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 GROUP Data Set
Contents of GROUP Data Set – View 1
Group Data Set – View 2
Group Data Set – View 3