Hi Gurus,
I would like to ask if anyone know how to dynamically assign the output file name with current system datetime ?
I have attached the sample.
Thank you for your help
You might try to use one of the automatic macro variables that contain time information. Although I'm not sure if it breaks EG's dataset tracking (making creating process flows harder).
data x_%sysfunc(translate(%sysfunc(datetime(),datetime20.),_,:));
input col1 $ col2 $ col3 $;
x=catx(',',of col1-col3);
cards;
s y x
;
run;
Hi KSharp,
Thank you for your help, do you know how to do that in proc sql?
thanks
@SASNE wrote:
Hi KSharp,
Thank you for your help, do you know how to do that in proc sql?
thanks
proc sql;
create table x_%sysfunc(translate(%sysfunc(datetime(),datetime20.),_,:)) as
select ....
from ....
;
quit;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.