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

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 794 views
  • 0 likes
  • 2 in conversation