Hello,
I have a user with an issue where she is running multiple chuncks of sas code and she wants each result in it's own html file not combined. Currently it takes all the output and creates the html file.
I had her try using the following code, but it isn't working as expected. She gets blank results even when the log says there should be data.
ods html close;
ods html;
Is there an option in SAS to make every result a seperate html file?
Thank you
Hi Jerry,
here is some trivial example to output data in two different files. Hope this is what you are looking for.
ods html body="/folders/myfolders/sasuser.v94/test1.html";
data test;
x=1;
run;
proc print data=test;
run;
ods html close;
ods html body="/folders/myfolders/sasuser.v94/test2.html";
data test2;
y=2;
run;
proc print data=test2;
run;
ods html close;
This produces two html files with different sets.
Of course you might have to adjust the filesnames (after body=) as you like.
jefreytag,
Thanks for the reply.
I don't mean to create the actual html files myself.
I'm talking about the html files that SAS generates when there are results to view.
Within options -> Perferences -> Results
Create listing, Create HTML and View results as they are generated are check.
The HTML file that SAS is creating is showing all the output not just the output from that specific SAS code.
You mean you only want to have some of the general output printed? Like when you have three "proc print"s, you only want the output from the third? Or do you want to open multiple result tabs? I still do not quite get it.
Hi Cynthia,
Thank you so much for your reply. We are using Base SAS in a windows eviroment. Is there a way to clear the cumulative output every time before she runs the next section of code?
I will read the paper and see what I can use from there. Thank you for your help.
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.
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.