BookmarkSubscribeRSS Feed
jmm07
Calcite | Level 5

Hello - 

 

with 

ods noproctitle;

I can remove the proc title. But how do I remove the proc "subtitle" from proc univariate ods output? (see image) It always gives the variable name and places it in the rtf header. Is there any way to disable this functionality?

 

Screenshot 2019-08-15 at 16.32.23.png

 

 

Thank you! 

 

5 REPLIES 5
Reeza
Super User

Unfortunately I think that's a template modification which is a bit more complicated. What are you trying to do overall? I would instead recommend capturing the ODS output and printing it yourself.

 

Here's some instructions and explanations on how to capture output that is shown.
https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods...

 

I hope I'm wrong and there's another option!

 


@jmm07 wrote:

Hello - 

 

with 

ods noproctitle;

I can remove the proc title. But how do I remove the proc "subtitle" from proc univariate ods output? (see image) It always gives the variable name and places it in the rtf header. Is there any way to disable this functionality?

 

Screenshot 2019-08-15 at 16.32.23.png

 

 

Thank you! 

 


 

Cynthia_sas
Diamond | Level 26
Hi:
@Reeza is correct. The only way to change the output from PROC UNIVARIATE is to change the table template used for the Quantiles object. It is far easier to capture the Quantiles output with ODS OUTPUT and then use PROC PRINT or PROC REPORT to display the Quantile information without the intermediate note about the variable.

Cynthia
jmm07
Calcite | Level 5

Hello Cynthia, Hello Reeza, 

 

Thank you for your quick responses. 

 

I am trying to build a "universal" template that users can insert any procedure into to create a standard output rtf file.

 

It seems like capturing the ods output for each type of procedure and then sending it to a standardized proc print / proc template is the way to go. 

 

Jacob 

Reeza
Super User
Or customizing a template for your company may be the right way to go in this case. Depends on which skill set you want to learn 🙂
Cynthia_sas
Diamond | Level 26

Hi: The "universal" template idea won't work, unfortunately. Every procedure (except for PRINT, REPORT and TABULATE) has a separate output object with a required name for example, the required name for the QUANTILES table in PROC UNIVARIATE is Base.Univariate.Quantiles -- you cannot change that name -- every time you run UNIVARIATE and get Quantiles this is the template for this object that is going to be used. You can't make a "universal" template because every output object "knows" what unique template name it needs to be created from.

So you'd need a modified PROC FREQ template, a modified PROC REG template, a modified UNIVARIATE template and not just a modified UNIVARIATE template, but a modified QUANTILES template, a modified EXTREMEOBS template, a modified TESTSFORLOCATION template, etc, etc ..and then what if...off the wall, somebody decides to use your "universal" idea for PROC GLIMMIX and you didn't account for that?? Rather than 1 universal template as you envision, you'll end up with needing a modified template for each procedure and each output object created by a procedure, that you want to change AND you'll have to make sure that everybody can use the template store where you write the templates so everybody can access them.

Each procedure creates output objects and each output object is linked to a specific table template which dictates things like order of columns, intermediate headers, placement for notes, formats for numbers, etc. You have to change the TABLE template for EACH procedure and each output object to suit what you want. Far easier, in my opinion, to teach folks ODS OUTPUT to grab the table information they want for their output object of interest (after the procedure is done with it) and then use PROC PRINT/PROC REPORT.

For example, with PROC UNIVARIATE, and QUANTILES, you'd do something like this:

 
title 'Some Title';
ods noproctitle;
   
ods select quantiles;
ods output quantiles=work.carquant;
proc univariate data=sashelp.cars;
  var mpg_highway;
run;
 
proc report data=work.carquant;
  Column ('Quantiles (Definition 5)' Quantile Estimate);
  define Quantile / 'Level' order order=data style(column)=Header;
  define estimate / 'Quantile' display;
run;



Cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 2897 views
  • 0 likes
  • 3 in conversation