i tried turning off and on but all tables have the title. why is it not working like title statement does?
could this be a question that's asked on the exam? i don't understand how we're supposed to know this kind of thing.
Hi:
You need to add step boundaries so that procedures end cleanly. Here's what I mean -- when I use the correct step boundaries, the procedure titles work as expected. If you don't end the first PROC MEANS, the ODS NOPROCTITLE has a "halo" effect of one step, but the step is not clear, so that's why it doesn't work correctly. Add the step boundaries and the ODS PROCTITLE/NOPROCTITLE work as they are intended:
Cynthia
Hi:
We really hope that students will ask themselves "what if" or "how does that work" or "what happens when" questions and test things out. Here's an example:
The ODS PROCTITLE and ODS NOPROCTITLE statement is turned on or turned off by just issuing the statement before your procedure. Not all procedures have procedure titles. The DATA step doesn't use PROCTITLE for example and another example is PROC SORT, which doesn't produce any Results/Report output for display. When you ask why it's not working like the TITLE statement, it's not "global", it doesn't work with ANY procedure that produces output. It only works with what I jokingly refer to as the "self-announcing" procedures -- the ones that broadcast the procedure name in the Results/Report. The halo effect of the PROCTITLE (PTITLE) or NOPROCTITLE (NOPTITLE) ODS statement is that it acts like a toggle. When it's on (and it's on by default), it's on until you toggle it off. When it's off, it's off until you toggle it back on. That's sort of how TITLEs and FOOTNOTEs work too. Most people who are producing reports for publication just get into the habit of turning it off.
If you want to know what topics that could be on the certification exam, we recommend that you look at the Content Guide for the exam, here:
Cynthia
that's odd, because i tried turning off and on for the same proc procedure. i.e. the exact same code one with noproctitle and one with it turned on, yet both had the title. which led me to think that it does not work in the way you mention.
I think you are confusing the TITLE with the PROCTITLE.
The PROCTITLE is a title that essentially tells you what PROC you are using. Some have it. You can remove the PROC title with ODS NOPROCTITLE. Once you turn the option off, it stays off until you turn it back or you sign out and sign back into SAS.
The TITLE is some text you add using the TITLE statement. The TITLE statement is GLOBAL. So it's best practice after you add a title to some output, to clear the titles.
So this proc will have a title:
title "I am a title";
proc something...
title; <-- clears title
This proc won't have a title:
proc something...
Try this code and play around with it.
title "I am the title";
title2 "Below me is the PROCTITLE. It says 'The MEANS Procedure'";
proc means data=sashelp.cars;
var MPG_City;
run;
*clear titles*;
title;
* Remove the PROCTITLE *;
ods noproctitle;
title "I am the title";
title2 "Below me the PROCTITLE has been removed with ODS NOPROCTITLE";
proc means data=sashelp.cars;
var MPG_City;
run;
*clear titles*;
title;
I have done this again and it still does not work. once i turn ods proctitle back on, it displays the title for both means tables.
ods graphics on;
ods noproctitle;
proc means data= cert.penngolf;
ods proctitle;
proc means data= cert.penngolf;
I recommend reviewing the SAS Programming I course. It's free: https://support.sas.com/edu/schedules.html?crs=PROG1&ctry=US
For the title and footnote statements review: Lesson 5 - Section 1: Enhancing Reports with Titles, Footnotes, and Labels. It's the first video, Using Titles and Footnotes.
To see what ODS NOPROCTITLE does review: Lesson 5 - Section 2: Creating Frequency Reports. It's the first video, Demo: Creating Frequency Reports and Graphs.
- Peter
Hi:
You need to add step boundaries so that procedures end cleanly. Here's what I mean -- when I use the correct step boundaries, the procedure titles work as expected. If you don't end the first PROC MEANS, the ODS NOPROCTITLE has a "halo" effect of one step, but the step is not clear, so that's why it doesn't work correctly. Add the step boundaries and the ODS PROCTITLE/NOPROCTITLE work as they are intended:
Cynthia
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.
Find more tutorials on the SAS Users YouTube channel.