Chapter Contents

Previous

Next
The DATASETS Procedure

PROC DATASETS Statement


PROC DATASETS <option(s)>;

To do this Use this option
Specify the procedure input library LIBRARY=
Provide alter access to any alter-protected SAS file in the SAS data library ALTER=
Include information in the output about the number of observations, number of variables, and data set labels DETAILS|NODETAILS
Force a RUN group to execute even when there are errors FORCE
Force an append operation FORCE
Delete SAS files KILL
Restrict processing to a certain type of SAS file MEMTYPE=
Suppress the printing of the directory NOLIST
Suppress error processing NOWARN
Provide read, write, or alter access PW=
Provide read access READ=


Options

ALTER=alter-password
provides the alter password for any alter-protected SAS files in the SAS data library.
See also: Using Passwords with the DATASETS Procedure

DETAILS|NODETAILS
determines whether the output includes the following columns:

Obs or Entries
gives the number of observations for SAS files of type DATA and VIEW and the number of entries for type CATALOG. If the SAS System cannot determine the number of observations in a SAS data set, the value in this column is a period (.). The value for type CATALOG is the total number of entries. For other types, this column is blank.

Vars
gives the number of variables for types DATA and VIEW. If the SAS System cannot determine the number of variables in the SAS data set, the value in this column is a period (.). For other types, this column is blank.

Label
contains the label associated with the SAS data set. This column prints a label only for the type DATA.

The DETAILS option requires read access to all read-protected SAS files in the SAS data library. If you do not supply the read password, the directory listing contains missing values for the columns produced by the DETAILS option.
Default: DETAILS system option setting
Tip: If you are using the SAS windowing environment and specify the DETAILS option for a library that contains read-protected SAS files, a requestor window prompts you for each read password that you do not specify in the PROC DATASETS statement. Therefore, you may want to assign the same read password to all SAS files in the same SAS data library.
Featured in: Manipulating SAS Files

FORCE
performs two separate actions:

KILL
deletes all SAS files in the SAS data library that are available for processing. The MEMTYPE= option subsets the member types that the statement deletes.
CAUTION:
The KILL option deletes the SAS files immediately after you submit the statement.   [cautionend]

LIBRARY=libref
names the library that the procedure processes. This library is the procedure input library.
Aliases: DDNAME=, DD=, LIB=
Default: WORK or USER. See Temporary and Permanent SAS Data Sets for more information on the WORK and USER libraries.
Restriction: A SAS library that is accessed via a sequential engine (such as a tape format engine) cannot be specified as the value of the LIBRARY= option.
Featured in: Manipulating SAS Files

MEMTYPE=(mtype(s))
restricts processing to one or more member types and restricts the listing of the data library directory to SAS files of the specified member types. For example, the following PROC DATASETS statement limits processing to SAS data sets in the default data library and limits the directory listing in the SAS log to SAS files of member type DATA:
   proc datasets memtype=data;
Aliases: MTYPE=, MT=
Default: ALL
See also: Restricting Member Types Available for Processing

NODETAILS
See the description of DETAILS .

NOLIST
suppresses in the SAS log the printing of the directory of the SAS files that are available for processing.
Featured in: Modifying SAS Data Sets

NOWARN
suppresses the error processing that occurs when a SAS file that is specified in a SAVE, CHANGE, EXCHANGE, or COPY statement or listed as the first SAS file in an AGE statement is not in the procedure input library. When an error occurs and the NOWARN option is in effect, PROC DATASETS continues processing that RUN group. If NOWARN is not in effect, PROC DATASETS stops processing that RUN group.

PW= password
provides the password for any protected SAS files in the SAS data library. PW= can act as an alias for READ=, WRITE=, or ALTER=.
See also: Using Passwords with the DATASETS Procedure

READ=read-password
provides the read-password for any read-protected SAS files in the SAS data library.
See also: Using Passwords with the DATASETS Procedure


Chapter Contents

Previous

Next

Top of Page

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