BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mmea
Quartz | Level 8

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

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 769 views
  • 0 likes
  • 2 in conversation