我们一直在使用EG手动运行SAS作业,我正在尝试使用shell脚本自动化一些SAS进程。但是,以前在EG中运行的所有脚本现在都会发出错误消息,指出Libref未分配。
如何将我们在EG中拥有的所有库分配/迁移到UNIX以供所有SAS脚本使用?
这是我用来测试的代码之一:
proc sql print;
connect using CPP_SRC as sql;
create table RESULTS.dummy_tt2 as
select *
from connection to sql(select * from bns_results.dummy_tt) ;
disconnect from sql;
quit;
我得到的错误:
NOTE: SAS initialization used:
real time 0.03 seconds
cpu time 0.02 seconds
1 proc sql print;
2 connect using CPP_SRC as sql;
ERROR: Libref CPP_SRC is not assigned.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
3 create table RESULTS.dummy_tt2 as
4 select *
5 from connection to sql(
6 select * from bns_results.dummy_tt
7 ) ;
NOTE: Statement not executed due to NOEXEC option.
8 disconnect from sql;
NOTE: Statement not executed due to NOEXEC option.
9 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
由于
答案 0 :(得分:0)
在EG中,CPP_SRC
库可能是在元数据中定义的。尝试使用options mprint;
运行此macro以提取在Unix中重新创建库所需的SAS代码。
简而言之,您需要创建一个包含所有libname
语句的新脚本,以便在Unix会话中分配它们。