Search the site...

SASCRUNCH TRAINING
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
  • Home
  • Member's Area
  • How to Start
  • SAS Interface
  • Creating a Data Set
  • Practical SAS Training Course
  • SAS Certified Specialist Training Program
  • Proc SQL Course
  • Introduction to Time Series Analysis
  • SAS Project Training Course
  • Full Training / Membership
  • Sign up
  • About us
  • Contact us
Sentry Page Protection
Please Wait...
Proc Contents [3-3]
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
Picture

The WORK library now contains 3 data sets:
  • DS1
  • DS2
  • Ds3

Now, let's run the code below:

Proc Contents Data=Work._all_;
Run;
Picture

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
Picture
[Expand the window for better viewing]

2. The list of data sets and SAS files

Picture

3. The descriptor portion of each of the data sets in the library.
​
Picture
Picture
Picture

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;
Picture

Exercise
Run the CONTENTS procedure and prints the list of all of the data sets in the SASHelp library.
Next

Need some help?
Get Hint
Get Solution
Fill out my online form.

Home 
​
1 2 3 4 5 6 7
Summary | Final Test | Coding Exercises
Coding Project

Already a member? Go to member's area.