Previous Page | Next Page

The DOCUMENT Procedure

LIST Statement


Lists the contents of one or more entries.
Default: Only summary information is displayed if the DETAILS option is omitted.
Default: If the ORDER= option is omitted, then the contents of the specified entries are listed in the order specified by the INSERT option.
Tip: To see any entries that might be hidden in the current file location, use the LIST statement.
Featured in: Navigating the File Location and Listing the Entries, Opening and Listing ODS Documents, and Managing Entries

LIST path<(where-expression)> <, path-2<(where-expression-2)>>
<, ...path-n<(where-expression-n)>> </ option(s)>;


Required Arguments

path

specifies the location of an entry. An entry can be one or more file locations, links, or output objects. For example, the following LIST statement lists all of the entries within the Report entry:

list \sasuser.imports\report;
run; 
Requirement: Separate multiple paths with commas.
Tip: You can use the symbol '^' to represent the current path and the symbol '^^' to represent the parent path.

Options

BYGROUPS

creates, in the entry list, columns for BY variables. The name of the BY variable becomes the column name. The values of the BY variables are listed in the columns.

Note:   When you specify the BYGROUPS option, only entries containing BY group information are listed.   [cautionend]

Interaction: It is recommended that when you specify the BYGROUPS option, specify the LEVELS=ALL option also. If the LEVELS=ALL option is not specified, then ODS cannot find BY group information within all levels of the directories. Therefore, no list can be produced because only entries containing BY group information are listed.
Featured in: Listing BY-Group Entries
DETAILS

specifies the properties of the entries. For example, the following LIST statement lists the details of three levels of the Report entry:

list \sasuser.imports\report /details levels=3;
run;
FOLLOW

resolves all links and lists the contents of the entries.

LEVELS= ALL | value

specifies the level of the path that you want to list.

ALL

specifies all levels of the path.

value

specifies the numeric value of the path level. For example, the following LIST statement lists the details of three levels of the Report entry:

list \sasuser.imports\report /details levels=3;
run;
Default: If you omit the LEVELS= option, then the default value of the level is 1.
Restriction: The LEVELS= option is valid only when you specify a directory.
ORDER= ALPHA | DATE | INSERT

specifies the order in which the entries are listed.

ALPHA

lists the entries in alphabetical order.

DATE

lists the file locations in ascending order based on the date and time the files were created.

INSERT

lists the file locations in the order in which you arranged the entries.

where-expression

selects, for listing, entries in an ODS document that meet a particular condition.

Featured in: Opening and Listing ODS Documents
See: Using WHERE Expressions with the DOCUMENT Procedure

Previous Page | Next Page | Top of Page