Chapter Contents |
Previous |
Next |
SAS Component Language: Reference |
IF expression THEN statement; |
<ELSE statement;> |
For example:
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.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.