The SAS Output Delivery System and reporting techniques

Append outputs to the beginning of an existing html file

Reply
Contributor
Posts: 30

Append outputs to the beginning of an existing html file

Dear all,

I'm currently working with SAS v9.1.3 and ods html.
1- I'm using proc compare and all the comparisons are put in my html file.
2- Using the outdiff option in proc compare statement, I can create a dataset which is intended to provide a nice summary of all the comparisons. I do a proc print of this summary dataset to be put in the html file also.

However, I would like to put this summary at the very beginning of my file (and not at the end).
I have tried using notop, nobot options. But nothing works fine or probably I'm not using it correctly. Is there any way to tell to SAS to put this proc print at a specific location in the html file ?

Thanks a lot in advance for your help,

Kind regards,

Violaine
SAS Super FREQ
Posts: 8,868

Re: Append outputs to the beginning of an existing html file

Hi:
All the appending that you do with ODS HTML happens at the end of the file not at a place that you choose. You can't really "prepend" a file at the "top". One thing you might consider doing --would be to save the PROC COMPARE output to an ODS DOCUMENT store and then to do your PROC PRINT followed by a PROC DOCUMENT replay for the PROC COMPARE output objects.

I have used PROC DOCUMENT and ODS DOCUMENT for storing and replaying output objects, but not with PROC COMPARE. Although, this paper shows using PROC COMPARE with ODS DOCUMENT:
http://www.nesug.org/proceedings/nesug07/ap/ap15.pdf

So that is one avenue to try. If you prefer not to work with ODS DOCUMENT and PROC DOCUMENT, the only thing I can think of is to create your HTML file with PROC COMPARE, then create a separate HTML file for the PROC PRINT and then write a DATA Step program to post-process the first file and to insert the second file wherever you want.

cynthia
Contributor
Posts: 30

Re: Append outputs to the beginning of an existing html file

Posted in reply to Cynthia_sas
Hi Cynthia,

Thanks so much for you help here! I have used the proc document (which I did not know... always nice to know more and more about SAS).
Thanks again for your very helpful support!

Kind regards,
Violaine
SAS Super FREQ
Posts: 8,868

Re: Append outputs to the beginning of an existing html file

Yes, I think PROC DOCUMENT and ODS DOCUMENT are quite cool! I'm glad you got it working.

cynthia
Ask a Question
Discussion stats
  • 3 replies
  • 114 views
  • 0 likes
  • 2 in conversation