开发者

How to suppress error messages from SAS proc sql execute statement

I use SAS proc sql execute statement to run sql and access tables on Oracle server. In order to let the script run automatically, I normally drop tables or indice before creating them. Sometimes however开发者_运维技巧, when the drop sql code runs, the table or index doesn't exist. An error message will be logged in SAS about dropping something that doesn't exist. But since the SAS code will continue after the drops, this kind of error message doesn't matter at all. I want to suppress these error messages, stop SAS from logging them because I don't care about them. How can I do this in proc sql?

Thanks for any help.


I'm not aware of an option to supress this single type of error. There are a couple of options though.

The best bet is to clean up your code so you check to see if the data set exists before trying to act on it:

%if %sysfunc(exist(&name_of_data_set)) %then %do;

You could also redirect all logging during these steps where you get messages you don't want with proc printto, but you would potentially lose valuable information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜