|
5#

楼主 |
发表于 2011-9-18 03:03:23
|
只看该作者
Re: 请教open() function
yes, I tried again according what you suggested, cloase SAS and reopen it(repeat it hundreds times). then, run the code besides the line :
data b;
input x1 y;
cards;
1 20
2 50
;
run;
%macro aaa;
%let dsid=%sysfunc(open(b));
%if %sysfunc(varnum(&dsid.,x))^=0 %then %do;
data c;set b;
xy=x;
run;
%end;
%else %do;
data c;set b;
xy=y;
run;
%end;
%let dsid=%sysfunc(close(&dsid));
/*
%let dsid=sysfunc(close(&dsid)); or
%let dsid=%sysfunc(close(&dsid)); or
%let rc=%sysfunc(close(&dsid));
*/
%mend;
%aaa
however, nothing changed, and the problem still there.(BTW, what is your SAS? 9.1 or 9.2? Mine is 9.1.)
can anyone help? Thanks. |
|