Sentry Page Protection
Proc Contents [3-3]
SAS Base Exam
SAS Base Exam
_ALL_ Keyword
So far, we have learned how to print the descriptor portion of just a single data set.
What if you want to print all the data sets in the entire library?
There is a short cut for that.
Example
What if you want to print all the data sets in the entire library?
There is a short cut for that.
Example
The WORK library now contains 3 data sets:
- DS1
- DS2
- Ds3
Now, let's run the code below:
Proc Contents Data=Work._all_;
Run;
The work._all_ tells SAS to run the CONTENTS procedure on all of the data sets in the WORK library.
This will first create 3 sets of tables:
1. The Library Directory
2. The list of data sets and SAS files
3. The descriptor portion of each of the data sets in the library.
Please note that you are not required to add library reference when referring to the data sets in the WORK library.
The following code prints identical results as above.
Proc Contents Data=_all_;
Run;
Exercise
Run the CONTENTS procedure and prints the list of all of the data sets in the SASHelp library.
Need some help?
Fill out my online form.