打破BASE SAS中不平衡报价条件的最佳技巧是什么? [英] What's your best trick to break out of an unbalanced quote condition in BASE SAS?

查看:84
本文介绍了打破BASE SAS中不平衡报价条件的最佳技巧是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为基本的SAS程序员,您会了解该钻探:

As a base SAS programmer, you know the drill:

您提交了SAS代码,其中包含不平衡的引号,因此,现在您不仅具有未闭合的引号,而且还具有未闭合的注释,宏函数定义和缺少的运行;或退出;声明.

You submit your SAS code, which contains an unbalanced quote, so now you've got not only and unclosed quote, but also unclosed comments, macro function definitions, and a missing run; or quit; statement.

不让那些不平衡的报价困扰您的最佳技巧是什么?

What's your best trick for not having those unbalanced quotes bother you?

推荐答案

企业指南3用来将以下行放在其自动生成的代码的顶部:

enterprise guide 3 used to put the following line at the top of its automatically generated code:

*';*";*/;run;

但是,真正从各种不平衡问题中复位"的唯一方法是退出sas会话,并在重新提交代码之前平衡所有不平衡的情况.使用这种快速(廉价?)黑客无法解决根本原因.

however, the only way to really "reset" from all kinds of something unbalanced problems is to quit the sas session, and balance whatever is unbalanced before re-submitting the code. Using this kind of quick (cheap?) hacks does not address the root cause.

顺便说一句,ods _all_ close;关闭 all 的ods目的地,包括默认的结果目的地.在交互式会话中,至少应根据文档,使用ods results;ods results on;重新打开它.但是当我在9.2上对其进行测试时,它不起作用,如下所示:

by the way, ods _all_ close; closes all the ods destinations, including the default, results destination. in an interactive session, you should open it again with ods results; or ods results on; at least according to the documention. but when i tested it on my 9.2, it did not work, as shown below:

%put sysvlong=&sysvlong sysscpl=&sysscpl;
/* sysvlong=9.02.01M0P020508 sysscpl=X64_VSPRO */

ods _all_ close;
proc print data=sashelp.class;
run;
/* on log
WARNING: No output destinations active.
*/

ods results on;
proc print data=sashelp.class;
run;
/* on log
WARNING: No output destinations active.
*/

这篇关于打破BASE SAS中不平衡报价条件的最佳技巧是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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