Previous Page | Next Page

Getting Information about Your SAS Data Sets

Review of SAS Tools


Procedures

PROC DATASETS <LIBRARY=libref <MEMTYPE=mtype(s)>>;

The MEMTYPE= option restricts processing to a certain type or types of SAS files and restricts the library directory listing to SAS files of the specified member types.


DATASETS Procedure Statements

CONTENTS <DATA=<libref>.SAS-data-set> <NODS> <SHORT> <VARNUM> ;

describes the contents of a specific SAS data set in the library. The default data set is the most recently created data set for the job or session. For the CONTENTS statement in PROC DATASETS, when you specify DATA=, the default libref is the procedure input library. However, for the CONTENTS procedure, the default libref is either WORK or USER.

Use the NODS option with the keyword _ALL_ in the DATA= option to produce only the directory listing of the library in SAS output. That is, the NODS option suppresses the contents of individual files. You cannot use the NODS option when you specify only one SAS data set in the DATA= option.

The SHORT option produces only an alphabetical list of variable names, index information, integrity constraint information, and sort information for the SAS data set.

The VARNUM option produces a list of variable names in the order in which they were defined, which is their logical position in the data set. By default, the CONTENTS statement lists variables alphabetically.

Previous Page | Next Page | Top of Page