I have a macro that creates a timestamp (to append to output file names). However, rather than have to remember what macro variable the macro assigns the value to, I would prefer to assign a macro variable to the result of the macro (if that isn't circular enough).
%let tms= %tms();
This is the current macro....
%macro tms ;
%* Create a Timestamp ;
%let tms_date= %sysfunc(date(),yymmdd10.) ; %* Todays date ;
%let tms_time= %sysfunc(time(),time.) ; %* Current Time ;
%* Format mmddyyhhmmss ;
%let tms=_%scan(&tms_date,1)%scan(&tms_date,2)%scan(&tms_date,3)%scan(&tms_time,1,:)%scan(&tms_time,2,:)%scan(&tms_time,3,:) ;
%mend ;
How do you quote this to make it work? Also, would I just remove the "%let tms=" from the macro?
Also, would the same quoting work for the following ODS assignment statement?
ods Tagsets.excelxp file="&outname.&tms..xml" style= Styles.XLsansPrinter ;
Thanks for taking the time....