BookmarkSubscribeRSS Feed
Sacevedop
Calcite | Level 5

Can someone help me please?

I'm doing a final work for University and when I run code by code, I get all the perfect graphics, but if I run all the codes at the same time, then only the last graph is repeated.

 

I have been told that I need to add something at the end of each code so I do not repeat the graphs.

3 REPLIES 3
Reeza
Super User

We don't have your data so can't run your program. And it's long so I don't want to read it all.

But it looks like you've just copied and pasted the code. In the log, it shows the path to the image files, is the name getting reset each time?

If so, remove the options you have on the ODS GRAPHICS statement and try again. 

 

If you're still having issues, post your log with two or three graphs created, not  the whole run.

ballardw
Super User

From your question it is not obvious if want to create duplicate graphs or prevent duplicate graphs.

 

The only way I see to create duplicate graphs is to rerun the code.

 

Did you need to clear the results viewer before running code?

 

Rick_SAS
SAS Super FREQ

the reason is that you are using

ODS GRAPHICS / RESET;

before each call.  The RESET option resets the filename counter, which causes the next graph to overwrite the previous.

 

To fix this problem, put ODS GRAPHICS / RESET IMAGEMAP at the top of your file, but nowhere else. 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 3 replies
  • 814 views
  • 1 like
  • 4 in conversation