BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Hi to all,

I recently switched to SAS v 9.4 and am now running on windows 8 64 bit. I am interested in changing the default title "Distribution of varname" in my ODS output to a customized title including a macro variable name. I am referring to the title that is included IN the image of the histogram (under the title "the UNIVARIATE procedure"). I used to do this very primitively in version 9.3 by running the source code I found for Base.Univariate.Graphics.Comphistogram with a modified line for EntryTitle (i.e. my own title). Now that is not working, even when modifying and using the source code I found in v 9.4, possibly because I don't know what and how to change...

Could someone please help me with a solution?

All the best,

Michael

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

On the plus side, its become easier Smiley Happy

ODSTITLE option on your histogram statement.

data Trans;

   input Thick @@;

   label Thick = 'Plating Thickness (mils)';

   datalines;

3.468 3.428 3.509 3.516 3.461 3.492 3.478 3.556 3.482 3.512

3.490 3.467 3.498 3.519 3.504 3.469 3.497 3.495 3.518 3.523

3.458 3.478 3.443 3.500 3.449 3.525 3.461 3.489 3.514 3.470

3.561 3.506 3.444 3.479 3.524 3.531 3.501 3.495 3.443 3.458

3.481 3.497 3.461 3.513 3.528 3.496 3.533 3.450 3.516 3.476

3.512 3.550 3.441 3.541 3.569 3.531 3.468 3.564 3.522 3.520

3.505 3.523 3.475 3.470 3.457 3.536 3.528 3.477 3.536 3.491

3.510 3.461 3.431 3.502 3.491 3.506 3.439 3.513 3.496 3.539

3.469 3.481 3.515 3.535 3.460 3.575 3.488 3.515 3.484 3.482

3.517 3.483 3.467 3.467 3.502 3.471 3.516 3.474 3.500 3.466

;

title 'Analysis of Plating Thickness';

ods graphics on;

proc univariate data=Trans noprint;

   histogram Thick/odstitle="Check this out";

run;

View solution in original post

20 REPLIES 20
Reeza
Super User

On the plus side, its become easier Smiley Happy

ODSTITLE option on your histogram statement.

data Trans;

   input Thick @@;

   label Thick = 'Plating Thickness (mils)';

   datalines;

3.468 3.428 3.509 3.516 3.461 3.492 3.478 3.556 3.482 3.512

3.490 3.467 3.498 3.519 3.504 3.469 3.497 3.495 3.518 3.523

3.458 3.478 3.443 3.500 3.449 3.525 3.461 3.489 3.514 3.470

3.561 3.506 3.444 3.479 3.524 3.531 3.501 3.495 3.443 3.458

3.481 3.497 3.461 3.513 3.528 3.496 3.533 3.450 3.516 3.476

3.512 3.550 3.441 3.541 3.569 3.531 3.468 3.564 3.522 3.520

3.505 3.523 3.475 3.470 3.457 3.536 3.528 3.477 3.536 3.491

3.510 3.461 3.431 3.502 3.491 3.506 3.439 3.513 3.496 3.539

3.469 3.481 3.515 3.535 3.460 3.575 3.488 3.515 3.484 3.482

3.517 3.483 3.467 3.467 3.502 3.471 3.516 3.474 3.500 3.466

;

title 'Analysis of Plating Thickness';

ods graphics on;

proc univariate data=Trans noprint;

   histogram Thick/odstitle="Check this out";

run;

PaigeMiller
Diamond | Level 26

I don't see this option documented anywhere in the SAS 9.4 docs for PROC UNIVARIATE ... nor does it appear as an option for PROC UNIVARIATE when I search for the word ODSTITLE ... can you point me to where this is documented?

--
Paige Miller
Reeza
Super User

This was all I could find on it:

What's New in SAS(R) 9.3 and SAS(R) Analytical Products 12.1

I couldn't find it in the doc myself, which doesn't mean it isn't there.

It was posted a few weeks ago here

PaigeMiller
Diamond | Level 26

So if it is new in SAS 9.3, shouldn't it be in the docs for 9.4? (rhetorical question, I don't expect you to answer)

Is this something worth reporting as a bug? Not a software bug, but a documentation bug? Has anyone ever reported a documentation bug before? (not a rhetorical question, I am really curious if this should be reported)

--
Paige Miller
Reeza
Super User

My guess is that it's documented else where, such as a generic ODS Graphics section or such.

My searches only showed it on SAS/QC though. And it does have some interesting new options.

PaigeMiller
Diamond | Level 26

When I am in SAS and press F1, I can then do a text search of the entire SAS 9.4 docs (for the products I have licensed), and ODSTITLE shows up for SAS/QC PROCs only.

So I have decided to report this as a "bug". That's why they pay me the big bucks!

--
Paige Miller
Cynthia_sas
SAS Super FREQ

Hi:

  I found ODSTITLE and ODSFOOTNOTE documented for PROC UNIVARIATE, here

Base SAS(R) 9.4 Procedures Guide: Statistical Procedures, Second Edition look for the options topic "Options for ODS Graphics Output".

cynthia

PaigeMiller
Diamond | Level 26

I see that, thank you, Cynthia, however my concern is that the documentation is not consistent, and ODSTITLE for PROC UNIVARIATE is not searchable

If I use F1 in SAS to launch the local Help Application, click on Index, then go to "UNIVARIATE Procedure, HISTOGRAM Statement" and then click on Dictionary of Options, ODSTITLE simply isn't in the Dictionary of Options.

Similarly, if I click on Search and type in ODSTITLE, it should search the entire text of the local Help Application, and find all pages that contain ODSTITLE, but it does not find any PROC UNIVARIATE instances of ODSTITLE. Every example found is for SAS/QC

--
Paige Miller
Tiny_Kane
Obsidian | Level 7

yep~ I am on SAS 9.3. I clicked the link you offered, it was What's New in SAS(R) 9.3 and SAS(R) Analytical Products 12.1

I thought SAS 9.3 worked too...But it was not...I am confused why they put the new feature into the above link....Anyway, thanks~

Reeza
Super User

My bad, it does say 9.3 so it should work. I just tested in on 9.3 and it does.

If it isn't post your code and log.

Tiny_Kane
Obsidian | Level 7

ods graphics on;

proc univariate data=data noprint;

histogram teg_r_time/ odstitle="analysis of teg_r_time";

run;

82   ods graphics on;

83   proc univariate data=data noprint;

84   histogram teg_r_time/ odstitle="analysis of teg_r_time";

                           --------

                           22

                           76

ERROR 22-322: Syntax error, expecting one of the following: ;, ANNOKEY, ANNOTATE, BARLABEL,

              BARWIDTH, BETA, CAXIS, CBARLINE, CFILL, CFRAME, CFRAMESIDE, CFRAMETOP, CGRID,

              CHREF, CLIPREF, CONTENTS, CPROP, CTEXT, CV, CVREF, DESCRIPTION, ENDPOINTS,

              EXPONENTIAL, FONT, FRONTREF, GAMMA, GRID, GUMBEL, HANGING, HAXIS, HEIGHT, HMINOR,

              HOFFSET, HREF, HREFLABELS, HREFLABPOS, IGAUSS, INFONT, INHEIGHT, INTERBAR,

              INTERTILE, KERNEL, LGRID, LHREF, LOGNORMAL, LVREF, MAXNBIN, MAXSIGMAS,

              MIDPERCENTS, MIDPOINTS, NAME, NCOL, NCOLS, NENDPOINTS, NMIDPOINTS, NOBARS,

              NOCHART, NOCURVELEGEND, NOFRAME, NOHLABEL, NOLEGEND, NOPLOT, NORMAL,

              NOTABCONTENTS, NOVLABEL, NOVTICK, NROW, NROWS, OUTHISTOGRAM, OUTKERNEL, PARETO,

              PFILL, POWER, RAYLEIGH, RTINCLUDE, SB, SU, TILELEGLABEL, TURNVLABELS, VAXIS,

              VAXISLABEL, VMINOR, VOFFSET, VREF, VREFLABELS, VREFLABPOS, VSCALE, WAXIS,

              WBARLINE, WEIBULL, WGRID.

ERROR 76-322: Syntax error, statement will be ignored.

85   run;

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE UNIVARIATE used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds

It seems like there is no this option......

Reeza
Super User

ods graphics on;

proc univariate data=sashelp.class noprint;

histogram weight/ odstitle = "Sample ODS output title";

run;

Does that work for you?

If not I'll go back to the version issue, make sure you have STAT 12.1

ie I see the following in my log:

NOTE: This session is executing on the X64_7PRO  platform.

NOTE: Enhanced analytical products:

SAS/STAT 12.1, SAS/IML 12.1

Tiny_Kane
Obsidian | Level 7

No, it does not work.....Now, we got the reason....I may not have STAT 12.1.... Do you know how to check version detail? thanks~~~

Reeza
Super User

Its at the top of the log when you first open SAS.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 20 replies
  • 27532 views
  • 4 likes
  • 5 in conversation