BookmarkSubscribeRSS Feed
hetuvio
Calcite | Level 5
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
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
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
hetuvio
Calcite | Level 5
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
Cynthia_sas
SAS Super FREQ
Yes, I think PROC DOCUMENT and ODS DOCUMENT are quite cool! I'm glad you got it working.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 755 views
  • 0 likes
  • 2 in conversation