The SAS Output Delivery System and reporting techniques

System Title in proc print/ods

Reply
Occasional Contributor
Posts: 16

System Title in proc print/ods

Hi, currently have something like this where I want to simply use proc print with ods otpions....

ods listing close;
ods tagsets.tableeditor file=dout options(web_tabs="&company_code") STYLE=uhc headtext="
Super Contributor
Posts: 394

Re: System Title in proc print/ods

You can suppress this default title by specifying a title statement with no title:

[pre]title;[/pre]
Occasional Contributor
Posts: 16

Re: System Title in proc print/ods

Sorry, not clear where to put that. In ODS stmt or in proc print...tried both ways & got errors .
SAS Super FREQ
Posts: 8,745

Re: System Title in proc print/ods

Hi:
The TITLE statement is a SAS Global statement. Any of these are valid:
[pre]

** NULL title statement inside PROC step boundary;
ods <destination information goes here> ;
proc print data=sashelp.class noobs;
title;
run;
ods _all_ close;

** TITLE statement with value outside ODS "sandwich";
title 'My Report Title';
ods <destination information goes here> ;
proc print data=sashelp.class noobs;
run;
ods _all_ close;

** TITLE statement with value inside PROC PRINT step;
ods <destination information goes here> ;
proc print data=sashelp.class noobs;
title 'My Report Title';
run;
ods _all_ close;
[/pre]

A "null" TITLE statement (TITLESmiley Wink will remove the TITLE1 value and any other TITLEs (TITLE2 through TITLE10) that have been set. Although some ODS destinations (such as HTML) have a TITLE= option, it is entirely different than the SAS Global TITLE statement. A TITLE statement is not tied to ODS -- in fact, a TITLE statement is not necessarily tied to any single procedure. You could issue a TITLE statement at the top of your program:
[pre]
title 'All My Output';

proc freq data=sashelp.shoes;
title2 'Proc Freq';
tables region;
run;

proc means data=sashelp.shoes;
title2 'Proc Means';
var sales;
run;

proc print data=sashelp.shoes(obs=5);
title2 'Five Obs';
run;
[/pre]

And then all 3 outputs, in the LISTING window, would have the same TITLE1 (All My Output) and different TITLE2 statements. If you routed your output to ODS, then, if your destination accepted the titles or used the titles, you should see them in your output. Every time SAS starts, a default TITLE1 statement is set, which makes the default title "The SAS System". To remove that default title in your output, you would issue a NULL TITLE statement, which is just the keyword TITLE, followed by a semi-colon. The statement is generally issued on a line by itself, not as part of an ODS statement, or a PROC statement:
[pre]
title;
[/pre]

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