这段 SAS 代码有什么问题?

发布于 2024-08-08 02:06:19 字数 364 浏览 5 评论 0原文

我从互联网上找到的一篇论文中复制了代码。

proc fcmp outlib=work.funcs.Test; 
     function whatAmI(); 
        return(42);
     endsub;
quit;

options cmplib=work.funcs;

data _null_;
    rci = whatAmI();
    put rci=; /* should be 42 */
run;

当我执行代码时,它显示以下消息: 错误 68-185:函数 WHATAMI 未知,或无法访问。

我尝试了其他功能,但总是显示此消息。 我更改了 libname,但没有任何效果。 怎么了?

I copy the code from a paper that i found on internet.

proc fcmp outlib=work.funcs.Test; 
     function whatAmI(); 
        return(42);
     endsub;
quit;

options cmplib=work.funcs;

data _null_;
    rci = whatAmI();
    put rci=; /* should be 42 */
run;

When I execute the code, it show the message:
ERROR 68-185: The function WHATAMI is unknown, or cannot be accessed.

I tried other functions and always show this message.
I change the libname, but nothing work.
What´s wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

哽咽笑 2024-08-15 02:06:19

我同意阿迪亚的观点。

看起来 9.2 有能力实际使用函数,而 9.1.3 只能或多或少创建它们。

查看此线程 了解更多信息。

I agree with Aditya.

Seems like 9.2 has the ability to actually use functions, while 9.1.3 only has the ability to more or less create them.

Check out THIS THREAD for more info.

笑咖 2024-08-15 02:06:19

看起来版本有问题。确保您使用的是 SAS 9.2,因为以前的版本对 PROC FCMP 的支持有限。

Looks like a problem with the version. Make sure you are using SAS 9.2, since previous versions have a limited support of PROC FCMP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文