Have you tried this:
ods html file='c:\temp\somefile.html' style=sasweb;
proc print data=sashelp.class;
ods html close;
This would take the data in SASHELP.CLASS and write out each row to an HTML file entitled SOMEFILE.HTML stored in the c:\temp directory.
Before ODS, people sometimes used code like this to generate their own HTML page:
set sashelp.class end=eof;
** write some html at the top of the file;
if _n_ = 1 then do;
** write something out for every row;
' Name '
' Age '
** write something out at the end of the data;
if eof then do;
How you would approach a solution to your question depends on what you want to do. If you have a basically tabular HTML report and you have a customized CSS file that has all your font and color preferences, then you could invoke ODS this way and use your own CSS file:
ods html path='c:\temp' (url=none)
.... rest of code...
ods html close;
OR you could generate a SAS style template to contain the colors and fonts preferences that you have.
Another kind of template you could use with ODS is a TAGSET template that would allow you to change the kind of MARKUP language tags that were written out around your data.
But, I'm not sure that you're talking about an ODS HTML template in the context of what you can do with ODS. I wonder whether you are talking about the kind of CGI templates that you can make and then populate with Perl or PHP or ASP or other scripting languages. (as described here: http://html-template.sourceforge.net/article.html )
In either case, your best bet may be to contact SAS Technical Support so they can determine exactly what kind of existing program you have and what kind of conversion program is best for your solution.
This what I am using earlier. The code that I had written on the mainframe is using the ODS concept. I had to move the code that is running on the mainframe to the SAS EG. But major processing will be done on mainframe. When ever the changes need to be applied on the HTML page, I had to change the code in the program. I do not want to that. I want to change the text changes of the HTML page instead of changing them in the code. I want to use the HTML page as a blank template, where the gaps can be filled by reading the dataset.
Without looking at your code, it is hard to understand what it is you want to do. If you were using ODS HTML, even on the mainframe, then there's not much you would have had to change in your program, except the code in the middle of the ODS "sandwich".
You would have to use PROC TEMPLATE to create a modified version of the HTML tagset template. I suggest that you contact SAS Tech Support, because they CAN look at your existing code and they can make suggestions about how you could alter the tagset template for HTML in order to generate the kind of output you want.
It is also possible with ODS to create XML files, so if your web server had a mechanism to transform from XML to HTML, and if you knew what your XML requirements would be to build an XML "data island", then you might also consider creating XML output. Tech Support could help you with this task as well.