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

查看:18
本文介绍了在 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?

推荐答案

enterprise guide 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; 关闭 所有 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天全站免登陆