10-29-2013 08:39 AM
I would like to store the generated HTML code(including all tags) as text/string in a dataset column instead of printing it out into a HTML document. Is there an ODS option to do this in SAS?
Any hints appreciated, thank you.
10-29-2013 09:32 AM
I'm not sure if there is an option to do this.
It might not be efficient, but have you considered creating the file then reading it in SAS to create your data set.
10-29-2013 04:38 PM
There is no ODS option to automatically do this in your ODS invocation statement or SAS options. However, you can always post-process the HTML file, after ODS creates the file, and read the HTML into a SAS dataset (using INFILE/INPUT syntax). However, I don't really understand why you would want to do this. It is possible, but I'm not sure what the utility of such a dataset would be.
10-30-2013 03:35 AM
Hi, thanks for your replies.
We are generating approx. 5k HTML files(each file is the evaluation result of a risk method) per year in scope of our risk method validation process. These outputs are published in our web platform only and are not accessed directly.To ease the maintenance of physically stored files, we are tending to this approach.
I'll try to read the files after they are generated.
10-30-2013 04:20 PM
I guess I don't understand the maintenance issues. Wouldn't you just add HTML files for every year or risk scenario? So, as long as you have write access to a browser folder, this year, you might have something like this:
...and then next year you would add report_2014_r1.html etc, etc...
As long as you keep your original datasets that were used to create the HTML files, you should be able to recreate any of the HTML files. Or, you could store the procedure results in an ODS DOCUMENT store, for archive purposes. Having the HTML tags and output in a SAS dataset just give you a different maintenance issue -- instead of 5K HTML files, won't you have 5K SAS datasets to maintain if you make a dataset for every HTML file? Once you had the HTML in a SAS dataset, how do you envision using these SAS datasets? Also, I don't understand what you mean when you say that the outputs are "published in our web platform only and are not accessed directly." If the HTML outputs are not accessed, why bother saving them?
If you're using SAS/IntrNet or the BI Platform or stored processes, you could dynamically generate an output when you need it. Or you could have a macro program that took a year or a set of parameters to control the number of HTML files that were created.