Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

CLOSE Statement

closes a SAS data set

CLOSE <SAS-data-set>;

where SAS-data-set can be specified with a one-word name (for example, A) or a two-word name (for example, SASUSER.A). More than one SAS data set can be listed in a CLOSE statement.

The CLOSE statement is used to close one or more SAS data sets opened with the USE, EDIT, or CREATE statements. To find out which data sets are open, use the SHOW datasets statement; see also the section on the SAVE statement later in this chapter. IML automatically closes all open data sets when a QUIT statement is executed. See Chapter 6, "Working with SAS Data Sets," for more information.

Examples of the CLOSE statement are shown below.

   close mydata;
   close mylib.mydata;
   close;               /* closes the current data set */

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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