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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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