出错时停止 SAS 程序 [英] Stop SAS Program on Error

查看:59
本文介绍了出错时停止 SAS 程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用宏在出现错误时停止我的 SAS 程序,但它总是与服务器断开连接,然后我无法再取回我的临时数据集.

I am using a macro to stop my SAS program on an error, but it always disconnects from the server and then I cannot get back my temporary data sets anymore.

我试过了:

OPTIONS ERRORABEND;

这是我试过的宏:

%macro errchk;
%if &syserr >0 and &syserr ne 4 %then %abort;
%mend errchk;

这个在遇到错误后继续处理以下数据步骤.

This one keeps processing the following data steps after reaching an error.

我不知道如何阻止程序的其余部分运行,但不能与 SAS 服务器断开连接.有什么想法吗?

I cannot figure out how to stop the rest of the program from running, but NOT disconnect from the SAS server. Any ideas?

推荐答案

我无法测试这个,因为我没有远程连接但是 %ABORT 有几个可选参数.通常我会在使用时使用 %ABORT cancel; .尝试每个额外的参数,看看这些参数是否有效.

I can't test this as I don't connect remotely but %ABORT has several optional parameters. Typically I'll use %ABORT cancel; when I use it. Try out each of the additional parameters and see if any of those work.

链接到 %ABORT 文档:

http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a002475061.htm

这篇关于出错时停止 SAS 程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆