I'm having trouble understanding how SAS Enterprise Guide determines where to send HTML output. In the windowing environment, I could define a style and run code such as the program below and obtain my output in the results window.
proc template;
define style mystyle;
parent=styles.default;
class graphbackground /
color=white;
style GraphData1 from GraphData1 /
contrastcolor=red linestyle=1 ;
style GraphData2 from GraphData2 /
contrastcolor=blue linestyle=1 ;
style GraphFonts from GraphFonts /
'GraphDataFont' = ("Arial", 12pt)
'GraphLabelFont' = ("Palatino", 12pt)
'GraphValueFont' = ("Arial Bold", 11pt)
'GraphAnnoFont' = ("Palatino", 11pt)
'GraphTitleFont' = ("Arial", 14pt);
end;
run;
ods html style=mystyle;
proc sgplot data=have ;
vbar total/ datalabel stat=percent );
label total = "Course Completions";
run;
However, in SAS Enterprise Guide 8.2, when I run this code, I receive an error message:
ERROR: Insufficient authorization to access C:\WINDOWS\system32\sashtml24.htm.
ERROR: No body file. HTML output will not be created.
Can I have it the old way when my styled output just appeared in the results window?
EG generates some of this ODS wrapper for you, and you can tap into that with your custom style options. Try this:
/* HTML5 is default in EG 8.2 */
ods html5(id=eghtml) style=mystyle;
proc sgplot data=have ;
vbar total/ datalabel stat=percent );
label total = "Course Completions";
run;
EG generates some of this ODS wrapper for you, and you can tap into that with your custom style options. Try this:
/* HTML5 is default in EG 8.2 */
ods html5(id=eghtml) style=mystyle;
proc sgplot data=have ;
vbar total/ datalabel stat=percent );
label total = "Course Completions";
run;
Thank you! I did try to look in the online documentation for a fix, but was unsuccessful. Is there a section of the SAS site that addresses these "wrapper" issues that people face when they transition from the windowing environment?
I'm not sure this is covered in the reference doc, but we have made some other practitioner info available in articles like this one.
There are many considerations when you run code in EG that can make it different when running in batch, traditional SAS, SAS Studio, etc. When you have code that needs to run in multiple places, the onus is on the programmer to examine the "environment" interactions (file interactions, for example) that need to be generalized or set up in conditions.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.