Hi
I have a functioning macro running through daily datasets. The macro itself works as it should and I get the outputs I want.
I would however like for SAS to save the files it generates as OUTPUTAdate OUTPUTBdate etc.
I can do so using this:
and then substitute data with whichever name I would like the datasets I create along the way to have.
I just can't seem to get it to work properly in a proc sql statement. One workaround is using proc sort instead, but that takes a substantially longer time to run and is my last resort.
Is there a solution to this?
Thanks in advance
Morten
I have a functioning macro running through daily datasets. The macro itself works as it should and I get the outputs I want.
I would however like for SAS to save the files it generates as OUTPUTAdate OUTPUTBdate etc.
I can do so using this:
Code:
data&year&mon2&day2
I just can't seem to get it to work properly in a proc sql statement. One workaround is using proc sort instead, but that takes a substantially longer time to run and is my last resort.
Code:
proc sql;
create table book&year&mon2&day2 as
select *
from data&year&mon2&day2, base&year&mon2&day2
where data&year&mon2&day2.ref = base&year&mon2&day2.ref;
quit;
Is there a solution to this?
Thanks in advance
Morten