Previous Page | Next Page

Language Reference

DATASETS Function

DATASETS( <libref> ) ;

The DATASETS function returns a character matrix that contains the names of the SAS data sets in the specified SAS data library. The result is a character matrix with rows and one column, where is the number of data sets in the library. If no argument is specified, SAS/IML software uses the default libname. (See the DEFLIB= option in the description of the RESET statement.)

For more information about specifying a SAS data library, see Chapter 7.

Recall that SAS distributes sample data sets in the Sashelp library. The following statements list the names of the first few data sets in the library:

lib = "sashelp";
a = datasets(lib);
First5 = a[1:5];
print First5;

Figure 23.77 Several Data Sets in the Sashelp Library
First5
ACCEPTS
ADOMSG
ADSMSG
AFMSG
AIR

Previous Page | Next Page | Top of Page