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

I have a rather complicated program that I run, it will iterate through a list of variables and do certain things...

 

One of those things I want to do, is create a scatterplot, so when I'm all done I can open up my HTML results and see a whole list of scatterplots that it created.

 

For some reason, my code works fine but the scatterplots never appear. In fact I get no HTML results whatsoever (the default in my case)

options source NOnotes NOserror;

%macro plotting(datasetname,xvar,yvar);
	proc sgscatter data=&datasetname);
	  title "&xvar versus &yvar";
	  plot (&xvar)*(&yvar)
	       / pbspline;
	run;
%mend plotting;


%macro main;
* do stuff;
   %plotting(&datasetname,&xvar,&yvar);
%mend main;

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

If you run the plot code, not the macro, do you get results?

 

Is anything in the macro directing where your output goes? If you have an ODS HTML statement you might need to watch where the ODS HTML Close statement is.

 

If you look in your default results folder do you have a bunch of PNG files corresponding to the graph calls?

 

If you did something with options regarding the imagefmt that might be an issue with some forms of graphs and options, activex and java both having limits.

 

Otherwise you may have to turn on OPTIONS MPRINT and look closer at the log for details.

View solution in original post

3 REPLIES 3
ballardw
Super User

If you run the plot code, not the macro, do you get results?

 

Is anything in the macro directing where your output goes? If you have an ODS HTML statement you might need to watch where the ODS HTML Close statement is.

 

If you look in your default results folder do you have a bunch of PNG files corresponding to the graph calls?

 

If you did something with options regarding the imagefmt that might be an issue with some forms of graphs and options, activex and java both having limits.

 

Otherwise you may have to turn on OPTIONS MPRINT and look closer at the log for details.

JBerry
Quartz | Level 8

Yeah, if I run the code alone, it prints right to the HTML output tab in E.G. 

 

I also searched for ods statements in the program and there are none. I attempted to wrap the macro in ods HTML file=   and ods close; but still nothing.

 

I'll turn on MPRINT and see if there are any clues...

JBerry
Quartz | Level 8

 

THANKS! 

 

Mprint showed the issue -  it was a silly extraneous character being inserted into the value for xvar from a prior process. Your tip saved me my sanity. Thanks!

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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