Null Statement


Signals the end of data lines; acts as a placeholder

Valid: Anywhere

Category: Action

Type: Executable

Syntax

;

or

;;;;

Without Arguments

The Null statement signals the end of the data lines that occur in your program.

Details

The primary use of the Null statement is to signal the end of data lines that follow a DATALINES or CARDS statement. In this case, the Null statement functions as a step boundary. When your data lines contain semicolons, use the DATALINES4 or CARDS4 statement and a Null statement of four semicolons.

Although the Null statement performs no action, it is an executable statement. Therefore, a label can precede the Null statement, or you can use it in conditional processing.

Examples

  • The Null statement in this program marks the end of data lines and functions as a step boundary.

     data test;     input score1 score2 score3;     datalines;  55 135 177  44 132 169  ; 
  • The input data records in this example contain semicolons. Use the Null statement following the DATALINES4 statement to signal the end of the data lines.

     data test2;     input code1 $ code2 $ code3 $;     datalines4;  55;39;1  135;32;4  177;27;3  78;29;1  149;22;4  179;37;3  ;;;; 
  • The Null statement is useful while you are developing a program. For example, use it after a statement label to test your program before you code the statements that follow the label.

     data _null_;     set dsn;     file print header=header;     put 'report text';    more statements    return;     header:;  run; 

See Also

Statements:

  • DATALINES Statement on page 1131

  • DATALINES4 Statement on page 1132

  • GO TO Statement on page 1210

  • LABEL Statement on page 1277




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