Language Reference

DATASETS Function

obtains the names of SAS data sets in a SAS data library

DATASETS( <libref>)

where libref is the name of a SAS data library. For more information about specifying a SAS data library, see Chapter 6.

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

For example, suppose you have several data sets in the SAS data library SASUSER. You can list the names of the data sets in SASUSER by using the DATASETS function as follows:

  
    lib={sasuser}; 
    a=datasets(lib);
 
Here is the output:
  
         A          6 rows      1 col     (character, size 8) 
  
                              CLASS 
                              FITNESS 
                              GROWTH 
                              HOUSES 
                              SASPARM 
                              TOBACCO
 

Previous Page | Next Page | Top of Page