I have searched some info about this error,but it seems none match mine,may someone familiar with this error take a look. "Code generated by a SAS macro, or submitted with a "submit selected" operation in your editor, can leave off a semicolon inadvertently." it is still abstruse for me to explore in my code by this comment.may someone give any advice..thanks! %let cnt=500; %let dataset=fund_sellList; %let sclj='~/task_out_szfh/fundSale/'; %let wjm='sz_fundSale_'; %macro write_dx; options spool; data _null_; cur_date=put(today(),yymmdd10.); cur_date=compress(cur_date,'-'); cnt=&cnt; retain i; set &dataset; if _n_=1 then i=cnt; if _n_<=i then do; abs_filename=&sclj.||&wjm.||cur_date||'.dat'; abs_filename=compress(abs_filename,''); file anyname filevar=abs_filename encoding='utf8' nobom ls=32767 DLM='|'; put cst_id @; put '@|' @; put cust_name @; put '@|' ; end; run; %mend write_dx; %write_dx(); and if I am not using macro,there is no error. data _null_; options spool; cur_date=put(today(),yymmdd10.); cur_date=compress(cur_date,'-'); cnt=&cnt; retain i; set &dataset; if _n_=1 then i=cnt; if _n_<=i then do; abs_filename=&sclj.||&wjm.||cur_date||'.dat'; abs_filename=compress(abs_filename,''); file anyname filevar=abs_filename encoding='utf8' nobom ls=32767 DLM='|'; put cst_id @; put '@|' @; put cust_name @; put '@|' ; end; run;
... View more