Overview (LIST command)
LIST
displays
case values for variables in the active dataset. The output is similar
to the output produced by the PRINT
command. However, LIST
is a
procedure and reads data, whereas PRINT
is a transformation and requires a procedure (or the EXECUTE
command) to execute it.
Options
Selecting and Ordering Variables. You
can specify a list of variables to be listed using the VARIABLES
subcommand.
Format. You can limit each case listing to a single line, and you can display
the case number for each listed case with the FORMAT
subcommand.
Selecting Cases. You can limit the listing
to a particular sequence of cases using the CASES
subcommand.
Basic Specification
- The basic specification
is simply
LIST
, which displays the values for all variables in the active dataset. - By default, cases wrap to multiple lines if all the values do not
fit within the page width (the page width is determined by the
SET WIDTH
command). Case numbers are not displayed for the listed cases.
Subcommand Order
All subcommands are optional and can be named in any order.
Operations
- If
VARIABLES
is not specified, variables are listed in the order in which they appear in the active dataset. -
LIST
does not display values for scratch or system variables. -
LIST
uses print formats contained in the dictionary of the active dataset. Alternative formats cannot be specified onLIST
. SeeFORMATS
orPRINT FORMATS
for information on changing print formats. -
LIST
output uses the width specified onSET
. - If a numeric value is longer than its defined width, the program first attempts to list the value by removing punctuation characters, then uses scientific notation, and finally prints asterisks.
- If a long string variable cannot be listed within the output width, it is truncated.
- Values of the variables listed for a case are always separated by at least one blank.
- System-missing values are displayed as a period for numeric variables and a blank for string variables.
- If cases fit on one line, the column width for each variable is determined by the length of the variable name or the format, whichever is greater. If the variable names do not fit on one line, they are printed vertically.
- If
cases do not fit on one line within the output width specified on
SET
, they are wrapped.LIST
displays a table illustrating the location of the variables in the output and prints the name of the first variable in each line at the beginning of the line. - Each
execution of
LIST
begins at the top of a new page. IfSPLIT FILE
is in effect, each split also begins at the top of a new page.