The SAS Output Delivery System and reporting techniques

How to capture ODS HTML into a variable

Reply
N/A
Posts: 0

How to capture ODS HTML into a variable

Can someone help me out?
What I would like to do is save the results of series of html statements into a variable.

i.e. save a proc tabulate into a variable that would include all the html code so I can store the html code into a database.

I imagine I could save the html file and then reread it with an input statement.

Any other ideas / suggestions ?
SAS Super FREQ
Posts: 8,868

Re: How to capture ODS HTML into a variable

Posted in reply to deleted_user
Hi:
I'm confused by what you want to do. When you do this:
[pre]
ods html file='c:\temp\wombat.html';
code;
ods html close;
[/pre]
then you ARE creating an HTML file and yes, you could read that file with an INPUT statement.

What I think you want, If I understand you correctly, you want to save the whole ASCII TEXT HTML file as the value of a single variable in a database???? I guess what confuses me is the "series of HTML statements" part. Would you mean everything that's in the ODS HTML sandwich above??? OR, would you mean the RESULTS of running the statements above?? In the first case, that sounds like a source code management system and in the second case, that sounds like a document management system.

In either case, I'm not sure that saving the HTML results into a single data base variable would work, because databases frequently have limitations on the size that a text field can hold and inevitably, you'll bump into that limit if you're trying to save the entire HTML results. That might not be the case if you saved just the source code into a data base or source management system. At any rate, your best bet for help may be to contact SAS Tech Support, as they can zero in on exactly what you want to do and help you figure out a way to do it, if it's possible/feasible/do-able.

To find out how to contact Tech Support, refer to:
http://support.sas.com/techsup/contact/index.html

cynthia
N/A
Posts: 0

Re: How to capture ODS HTML into a variable

Posted in reply to Cynthia_sas
>Would you mean everything that's in the ODS HTML sandwich above??? OR, would you mean the RESULTS of running the statements above??;

I mean the resuts, and yes therefore the ASCII text html generated by the series of ods statements. Or for that matter any ASCII text file.

I have seen [pre]put _infile_;[/pre] but am trying to figure out how to store that in a variable.

I am not concerned with the space limitations of my database field. I do this with some web based CMS systems I have developped.

I'll try Tech Support.
Ask a Question
Discussion stats
  • 2 replies
  • 137 views
  • 0 likes
  • 2 in conversation