| Product | Release |
|---|---|
| SAS/AF | 9.2 |
| 9.1.3 | |
| 9.1.2 | |
| 9.1 | |
| 9.0 | |
| SAS/FSP | 9.2 |
| 9.1.3 | |
| 9.1.2 | |
| 9.1 | |
| 9.0 |
| Previous Page | | | Next Page |
| Controlling Program Flow |
The IF-THEN/ELSE statement executes a statement or group of statements based on a condition that you specify.
| IF expression THEN statement; |
| <ELSE statement;> |
if (exist(table)) then _msg_='SAS table already exists.'; else do; call new(table,'',1,'y'); _msg_='Table has been created.'; end;
Suppose your application is designed to run in batch mode and you do not want to generate any messages. You could use a null statement after THEN:
if (exist(table)) then; else call new(table,'',1,'y');
For more information, refer to SAS Language Reference: Dictionary.
| Previous Page | | | Next Page | | | Top of Page |
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.
