Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
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 on specifying a SAS data library, see Chapter 6, "Working with SAS Data Sets."

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);
        A          6 rows      1 col     (character, size 8)

                             CLASS
                             FITNESS
                             GROWTH
                             HOUSES
                             SASPARM
                             TOBACCO

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.