DATA Step, Macro, Functions and more

ods title issue: can I have a title for different proc?

Reply
Super Contributor
Posts: 312

ods title issue: can I have a title for different proc?

if I want to have several proc to print on the same page, can I have a different title for each proc?

 

I tried and the titles in the 2nd and 3rd proc did not appear at all.

Super User
Posts: 17,749

Re: ods title issue: can I have a title for different proc?

Yes, post your code.

Super Contributor
Posts: 312

Re: ods title issue: can I have a title for different proc?

I confirm this is because the startpage=no option

without it, no problem. with it, the titles from the second proc is suppressed .
Super User
Super User
Posts: 7,392

Re: ods title issue: can I have a title for different proc?

Please post the code you have tried as this works fine for me:

ods rtf file="s:\temp\rob\temp.rtf";
title "This is first one";
proc print data=sashelp.class;
run;
title "Another one";
proc print data=sashelp.cars;
run;
ods rtf close;
Super Contributor
Posts: 312

Re: ods title issue: can I have a title for different proc?

when I add "startpage=no" then it does not work
Super Contributor
Posts: 312

Re: ods title issue: can I have a title for different proc?

Super User
Super User
Posts: 7,392

Re: ods title issue: can I have a title for different proc?

Yes, that is an example of using ods text="..."; to output some text at the point.  It is not titles/footnotes though.  If that works for you all well and good (just doesn't match your topic title Smiley Surprised)

Super Contributor
Posts: 312

Re: ods title issue: can I have a title for different proc?

yes, it works. when I wanted to center the text with:
ods escapechar='^';
ods text= "^S={width=100% just=c }test1 ";
I got the following warning:
416 ods text= "^S={width=100% just=c }test2 "
-
49
416! ;
NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release.
Inserting white space between a quoted string and the succeeding identifier is recommended

Super User
Posts: 10,466

Re: ods title issue: can I have a title for different proc?

With ODS RTF the BODYTITLE option is used to specify that the titles and footnotes go into the body of the document not the header or footer of the page. That will work with startpage=no to provide titles for each proc on a page.

 

the Note is just that, a note that sometime in the future the appearance of your output might chage because your code contains something like "quoted text here"variablename instead of "quoted text here" variablename. If you don't like the note put a space after the quoted string.

This note has been around since 9.0 at least.

Super User
Super User
Posts: 7,392

Re: ods title issue: can I have a title for different proc?

Yes, well there is the problem.  Startpage=no means there is no page break.  Titles and footnotes by their very nature can only apply to the page, i.e. they are the title of that page.  Because there is only one page you only get one page.  What does the output need to look like, you could try ods text="..."; to get a subheading, or use by groups, hard to say without an example.

Ask a Question
Discussion stats
  • 9 replies
  • 252 views
  • 0 likes
  • 4 in conversation