1

以下代码有一条错误消息,我正在努力解决这个问题。错误消息是:“未分配 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;
4

1 回答 1

1

错误消息表示您没有使用名称定义的 SAS 逻辑库引用(“libref”)HDMAPP。因为那是你的宏变量的值tmpschema,它是由你程序中的这一行引起的:

create table &tmpschema..testmp as

如果您尝试创建 SAS 数据集,则在该proc sql步骤之前应该有这样的语句:

libname HDMAPP 'path-to-local-file-system';
于 2013-01-04T15:31:27.917 回答