@laiguanyu001 wrote:
Hi,
I know that I can use sqlobs to refer to the observations in the proc sql step.
what is I am processing multiple proc sql steps? how do I differentiate the sqlobs from the first step to the sqlobs from the second step? Is there a way to name them?
If you currently have multiple SELECT clauses in a single Proc SQL step then you would need to modify the code to one Select per Sql call and assign the resulting sqlobs to a separate macro variable. Something like:
proc sql;
select clause
from source
;
quit;
%let count1 = &sqlobs.;
proc sql;
select clause2
from source2
;
quit;
%let count2 = &sqlobs.;
Possibly more descriptive names than Count1 and Count2 would be good idea to better identify the source.