To obtain a directory listing of all members in a library,
you need only the PROC DATASETS statement with the LIBRARY= option.
For example, the following statements send a directory listing to
the
Results window for a library that contains
climate information. The LIBNAME statement assigns the libref USCLIM
to this library:
libname usclim 'SAS-library';
proc datasets library=usclim;
The following output
displays the directory listing:
Display 37.1 Directory Listing for the Library USCLIM
The following is a list
of the items shown in the output:
Directory
gives the physical
name as well as the libref for the library. Some operating environments
provide both additional and different information.
Name
contains the second-level
SAS member name that is assigned to the file. If the files are different
member types, then you can have two files of the same name in one
library.
Member Type
indicates the SAS file
member type. The most common member types are DATA and CATALOG. For
example, the library USCLIM contains two catalogs of type CATALOG
and four date sets of type DATA.
File Size
specifies the size
of the file.
Last Modified
specifies the date
on which the file was last modified.
Note: After you execute PROC DATASETS
the first time, the DATASETS procedure continues to run. You can execute
more procedure statements without executing the PROC DATASETS statement
again. To end the DATASETS procedure, execute the
QUIT;
statement.