inf | client | netd | ftype | db |
ELD | ELD | Elders | ntunix | |
ELD | IRD | NZIR | ntunix | |
ELD | KPM | KPMG | ntunix | |
ELD | SCH | Schweppes | ntunix |
我自己写了一些, 可是调试不通, 说不能用do while 语句, 麻烦哪位指点一下应该怎么改, 万分感谢!!
//Open Cursor
%let cust=%sysfunc(open(work.customerlist,i));
%let _Inf =%sysfunc(varnum(&cust,Inf));
%let _Client=%sysfunc(varnum(&cust,Client));
%let _Netd =%sysfunc(varnum(&cust,Netd));
%let _Ftype =%sysfunc(varnum(&cust,Ftype));
%let _DB =%sysfunc(varnum(&cust,DB));
%do%while (%sysfunc(fetch(&_Inf))eq 0);
%letInf =%sysfunc(getvarc(&cust,&_Inf ));
%letClient=%sysfunc(getvarc(&cust,&_Client));
%letNetd =%sysfunc(getvarc(&cust,&_Netd ));
%letFtype =%sysfunc(getvarc(&cust,&_Ftype));
%letDB =%sysfunc(getvarc(&cust,&_DB ));
%put &Inf &Client &Netd &Ftype &DB;
run;
%end;
%letrc=%sysfunc(close(&id1)); //Close Cursor
============================
Log摘要
============================
1898
1899 %do %while (%sysfunc(fetch(&_Inf))eq 0);
ERROR: The %DO statement is not valid inopen code.
1900 %letInf =%sysfunc(getvarc(&cust,&_Inf ));
SYMBOLGEN: Macro variable CUST resolves to 1
SYMBOLGEN: Macro variable _INF resolves to 1
1907
1908 run;
1909
1910 %end;
ERROR: The %END statement is not validin open code.
1911
1912
1913 %let rc=%sysfunc(close(&cust));
SYMBOLGEN: Macro variable CUST resolves to 1