以下代码有一条错误消息,我正在努力想弄明白。错误消息是:“未分配Libname HDMAPP”。
提前感谢您的帮助!
%let tmpschema = HDMAPP; *schema for transient tables, test-HDMAPP, prod-HDMAPP;
%let userid = &uid; *data mart user;
%let password = &pw; *data mart password;
%let memschema = HDMTST; *schema for member tables;
%let datasrc = PHEDISRP; *odbc data source to connect to db2;
proc sql;
connect to odbc as HDMconnect (datasrc=&datasrc user=&userid password=&password);
create table &tmpschema..testmp as
select * from connection to HDMconnect
(select * from HDMPRD.MEMBER_CMPL);
disconnect from HDMconnect;
quit;
答案 0 :(得分:1)
错误消息表示您没有使用名称HDMAPP
定义的SAS库引用(“libref”)。因为这是宏变量tmpschema
的值,所以它是由程序中的这一行引起的:
create table &tmpschema..testmp as
如果您正在尝试创建SAS数据集,那么在proc sql
步骤之前应该有这样的语句:
libname HDMAPP 'path-to-local-file-system';