Hello all;
I have a macro that runs just fine. It is just that I want to call a piece of it somewhere else outside the macro without adding an additional data step. Code below followed by question:
%macro split (data=, var=, var1=, var2=);
proc sort data=&data(keep=&var &var1 &var2) out=values nodupkey;
by &var;
run;
data _null_;
set values end=last;
call symputx('M'||left(_n_),&var);
if last then call symput('count',_n_);
run;
%put _local_;
.....rest of macro
%mend split;
%split(data=HISTORY.ACUTEEXP, var=VISIT, Var1=start ,var2=end);
My question concerns the line:
if last then call symput('count',_n_);
I should be be able to call the "count" after the macro runs into anoter part of program?
If I try to call it, it remains unresolved.
Any solutions, greatly appreciated.
~Lawrence