LIST Statement


%LIST Statement

Displays lines that are entered in the current session

Valid: anywhere

Category: Program Control

Syntax

%LIST < n <: m m >>;

Without Arguments

In interactive line mode processing, if you use the %LIST statement without arguments, it displays all previously entered program lines.

Arguments

n

  • displays line n .

n “m

  • displays lines n through m .

  • Alias: n:m

Details

Where and When to Use 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.

Interactions

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.

Examples

This %LIST statement displays lines 10 through 20:

 %list 10-20; 

See Also

Statement:

  • %INCLUDE Statement on page 1215

System Option:

  • SPOOL System Option on page 1604




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net