Help using Base SAS procedures

Print only one title

Reply
Contributor
Posts: 29

Print only one title

Hello all,

I'm running a few REG and CORR procedures and using PRINTTO to send the results to a .lst file. As you know, for each call of REG and CORR it prints a header saying "The Reg Procedure" and associated information.

I like this header/title, but I'd like to stop it from printing a second time when there is a page break. How can I do this?

I thank you for your time.
SAS Super FREQ
Posts: 8,743

Re: Print only one title

Hi:
The ODS NOPTITLE statement is a global statement that will turn the procedure title off. However, it does not work on a page by page basis. It works either on a session by session basis (turn it off one time for the whole session) or on a procedure by procedure basis (turn it on and off before each procedure):
[pre]
ods noptitle;
** procedure 1;
run;

ods ptitle;
** procedure 2;
run;

ods noptitle;
** procedure 3;
run;

[/pre]

cynthia
Contributor
Posts: 29

Re: Print only one title

Cynthia, I do appreciate your response. I figured you would step in and offer some advice, you seem to be very helpful around here.

It sounds like SAS can't supress titles printing a second time. I am pretty surprised at this, it sounds like a logical feature to have. I guess I'll continue to edit my output accordingly.

Thank you again!
SAS Super FREQ
Posts: 8,743

Re: Print only one title

Hi:
SAS is PROCEDURE oriented. Not PAGE oriented. So the SAS title will appear on every page produced by a procedure. As needed, the SAS procedure title may or may not appear on every page, too. If you used ODS DOCUMENT/PROC DOCUMENT, it is possible to remove the titles that go with particular page breaks in the ODS DOCUMENT-- but this is not going to help you in the PROC PRINTTO situation.

You might try this:
[pre]
ods noptitle; /* turn off ALL procedure titles */

ods html file='mytxt.html' style=sasweb;
ods html text='Proc Reg Info Only Once';
Proc Reg;
quit;

ods html text='Proc Corr Only Once';
Proc Corr;
run;
ods html close;

[/pre]

For some destinations (HTML, RTF, PDF), you can suppress the procedure title and then use ODS TEXT statements to put
additional text before the procedure. But, since PROC PRINTTO is the equivalent of sending LISTING output to an ASCII text file, this technique would not work for you. You'd have to move over into the ODS world to use ODS TEXT=.

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