CONTENTS Procedure: UNIX
Prints the description of the contents of one or
more files from a SAS library.
UNIX specifics: |
information displayed in the SAS output |
See: |
CONTENTS Procedure in Base SAS Procedures Guide |
Syntax
PROC CONTENTS<option(s)> ;
Comparisons
The
CONTENTS procedure produces the same information as the CONTENTS statement
in the DATASETS procedure. (See
DATASETS Procedure: UNIX for a comparison.)
Example: Executing PROC CONTENTS
The following SAS code
creates two data sets,
classes.grades
and
classes.majors
,
and executes PROC CONTENTS to describe the
classes.majors
data
set:
libname classes '.';
data classes.grades (label='First Data Set');
input student year state $ grade1 grade2;
label year='Year of Birth';
format grade1 4.1;
datalines;
1000 1980 NC 85 87
1042 1981 MD 92 92
1095 1979 PA 78 72
1187 1980 MA 87 94
;
data classes.majors(label='Second Data Set');
input student $ year state $ grade1 grade2 major $;
label state='Home State';
format grade1 5.2;
datalines;
1000 1980 NC 84 87 Math
1042 1981 MD 92 92 History
1095 1979 PA 79 73 Physics
1187 1980 MA 87 74 Dance
1204 1981 NC 82 96 French
;
proc contents data=classes.majors;
run;
Output from the CONTENTS Procedure