RUN Statement


Executes the previously entered SAS statements

Valid: anywhere

Category: Program Control

Syntax

RUN <CANCEL>;

Without Arguments

Without arguments, the RUN statement executes the previously entered SAS statements.

Arguments

CANCEL

  • terminates the current step without executing it. SAS prints a message that indicates that the step was not executed.

  • CAUTION:

    • The CANCEL option does not prevent execution of a DATA step that contains a DATALINES or DATALINES4 statement.

    • The CANCEL option has no effect when you use the KILL option with PROC DATASETS.

Details

Although the RUN statement is not required between steps in a SAS program, using it creates a step boundary and can make the SAS log easier to read.

Examples

  • This RUN statement marks a step boundary and executes this PROC PRINT step:

     proc print data=report;     title 'Status Report';  run; 
  • This example shows the usefulness of the CANCEL option in a line prompt mode session. The fourth statement in the DATA step contains an invalid value for PI (4.13 instead of 3.14). RUN with CANCEL ends the DATA step and prevents it from executing.

     data circle;     infile  file-specification;  input radius;     c=2*4.13*radius;  run cancel; 
  • SAS writes the following message to the log:

     WARNING: DATA step not executed at users request. 



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