Displays lines that are entered in the current session
| Valid: |
anywhere
|
| Category: |
Program Control
|
In interactive line mode processing, if you use the
%LIST statement without arguments, it displays all previously entered program
lines.
-
n
-
displays line n.
-
n- m
-
displays lines n
through m.
The %LIST statement can be used anywhere in a SAS job
except between a DATALINES or DATALINES4 statement and the matching semicolon
(;) or semicolons (;;;;). This statement is useful mainly in interactive
line mode sessions to display SAS program code on the monitor. It is also
useful to determine lines to include when you use the %INCLUDE statement.
- CAUTION:
- In all modes of execution, the SPOOL
system option controls whether SAS statements are saved.
When the SPOOL system option is in effect in interactive
line mode, all SAS statements and data lines are saved automatically when
they are submitted. You can display them by using the %LIST statement. When
NOSPOOL is in effect, %LIST cannot display previous lines. ![[cautend]](../common/images/cautend.gif)
This %LIST statement displays lines 10 through 20:
%list 10-20;
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.