11-21-2016 11:47 AM
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;
Is there an option in SAS to make every result a seperate html file?
11-21-2016 03:06 PM - edited 11-21-2016 03:09 PM
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.
11-21-2016 04:04 PM
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.
11-22-2016 08:51 AM
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.
11-22-2016 09:55 AM
11-22-2016 11:31 AM
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.
11-22-2016 01:18 PM