Usage Note 24323: How can I conditionally execute a LINE statement?
LINE statements cannot be conditionally executed; they will always print out. However, the text that is printed in the LINE statement can be controlled.
In a compute block, use an IF statement to populate a text string with the desired values. Use this text string in the LINE statement:
PROC REPORT NOWD DATA=sashelp.class;
col age weight;
DEFINE age / ORDER;
BREAK AFTER age / SUMMARIZE;
COMPUTE AFTER age;
LENGTH text $ 30;
IF age GE 16 THEN text='drivers beware';
ELSE text='along for the ride';
LINE text $30.;
ENDCOMP;
RUN;
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Topic: | SAS Reference ==> Procedures ==> REPORT
|
Date Modified: | 2007-12-17 11:09:23 |
Date Created: | 2005-07-29 11:08:36 |