Hi , I am getting the below error when processing a macro: ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: eof ERROR: The condition in the %DO %UNTIL loop, eof, yielded an invalid or missing value, . The macro will stop executing. ERROR: The macro MAXVAR will stop executing. The code i am using is below: %macro maxvar(libref,dstname,type); options mprint mlogic symbolgen; proc contents data = &libref..&dstname out=dst1 (keep = name type); run; data dst2 (keep = name); set dst1; where type = &type. ; run; proc sql noprint; select name into :varlists separated by ' ' from dst2; quit; %put &varlists. ; proc sql noprint; select count(*) into :varcount from dst2; quit; %put &varcount.; data minmax (keep = var v_min v_max); array maxx(&varcount); array minn(&varcount); %do %until(eof); set test.getrate end=eof; array ch(&varcount) &varlists ; %do j=1 %to &varcount ; maxx(j)=max(maxx(j),lengthn(ch(j))); minn(j)=min(minn(j),lengthn(ch(j))); %end; %end; length var $32; %do j=1 %to &varcount ; var = vname(ch(j)); v_min=minn(j); v_max=maxx(j); output; %end; run; %mend; Just to give a idea, I am trying to find the maximum length of each character variable in a dataset. Could you please let me know what mistake i have done and what changes i need to make to remove this error.
... View more