Hi I have this code for a SGPLOT
%let numdate = %sysfunc(today(), yymmddn8.);
Ods listing gpath="F:\Folder";
ods graphics / imagename="Test_&numdate." imagefmt=png;
options orientation=landscape;
ods noproctitle;
PROC SGPLOT DATA = new PCTLEVEL=GROUP NOBORDER NOWALL NOCYCLEATTRS;
VBAR KMA / GROUP = myint stat= percent NOOUTLINE;
TITLE 'Svartider i sundhedssporet per region for den foregående uge';
keylegend / title="";
XAXIS DISPLAY=(NOLABEL);
YAXIS DISPLAY=(NOLABEL);
FORMAT myint intervalfmt.;
styleattrs DATACOLORS=(LightBlue STEEL Mistyrose FireBrick);
RUN;
ODS LISTING CLOSE;
When it is saved in the folder it will always be: test_(todaysdate)1
it will always put a number behind the date, i just want the date without numbering.
Is that possible?
Another question when it comes to that:
I have this code for sending out e-mails
filename outbox email
from=("test@test.dk")
to=("test@test.dk")
type='text/html'
subject='testt'
attach=("F:\Folder\Test_202012112.png" ct='png')
attach=("F:\Folder\\test_202012112.xlsx" content_type="excel")
ods html body=outbox rs=none style=Htmlblue;
run;
ods html close;
Is there a function in SAS where it can by it self find the newest file ? instead of writing files manually in the email code
You can try this:
ods graphics/reset=index;
This should not append a digit on the end of the filename for the first graph produced. The next graph produced will have a number appended, I am not aware of any way to stop that from happening.
You can try this:
ods graphics/reset=index;
This should not append a digit on the end of the filename for the first graph produced. The next graph produced will have a number appended, I am not aware of any way to stop that from happening.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.