How to suppress the tables that the HISTOGRAM statement creates?

Accepted Solution Solved
Reply
Contributor
Posts: 61
Accepted Solution

How to suppress the tables that the HISTOGRAM statement creates?

I want to suppress the tables that the HISTOGRAM statement creates.I used the NOPRINT option in the HISTOGRAM statement, but it does not work, error happened.

For example, my code is:

proc univariate data=data noprint;

histogram teg_alpha_angle teg_r_time / noprint;                                     

run;

Log information:

proc univariate data=data noprint;

69   histogram teg_alpha_angle teg_r_time / noprint;

                                            -------

                                            22

                                            202

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 202-322: The option or parameter is not recognized and will be ignored.

70   run;

How to solve this problem?? Thanks in advance~


Accepted Solutions
Solution
‎05-14-2014 02:58 PM
Super User
Posts: 17,963

Re: How to suppress the tables that the HISTOGRAM statement creates?

It really really really helps if you post that in the first place.

Use ODS SELECT to keep only the histogram.

ods select Histogram;

proc univariate data=sashelp.class noprint;

histogram weight height / normal;

run;

View solution in original post


All Replies
Super User
Posts: 10,552

Re: How to suppress the tables that the HISTOGRAM statement creates?

Noprint on the proc statement usually means that ODS output, such as histograms are suppressed. Only use the option on the HISTOGRAM statement.

Contributor
Posts: 61

Re: How to suppress the tables that the HISTOGRAM statement creates?

It still does not work....

code:

proc univariate data=data;

histogram alpha_angle/ noprint;                                      

run;

Log:

87   proc univariate data=data;

88   histogram alpha_angle/ noprint;

                            -------

                            22

                            202

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 202-322: The option or parameter is not recognized and will be ignored.

89   run;

Super User
Posts: 10,552

Re: How to suppress the tables that the HISTOGRAM statement creates?

Probably time to use a different procedure such as Prog SGPLOt

Contributor
Posts: 61

Re: How to suppress the tables that the HISTOGRAM statement creates?

Thanks for your suggestion.

But, in proc sgplot, it seems like each histogram statement can only has one variable, right?

Anyway, thanks~

Super User
Posts: 17,963

Re: How to suppress the tables that the HISTOGRAM statement creates?

What version of SAS are you on? I'm on SAS 9.3

This worked for me with no errors and no extra tables:

proc univariate data=sashelp.class noprint;

histogram weight height;

run;

Contributor
Posts: 61

Re: How to suppress the tables that the HISTOGRAM statement creates?

I am on SAS 9.3 too. This works for me too. But if you add normal option after histogram statement, estimates tables will come out again....I  want to suppress those tables.....

You can try:

proc univariate data=sashelp.class noprint;

histogram weight height / normal;

run;

Super Contributor
Posts: 394

Re: How to suppress the tables that the HISTOGRAM statement creates?

Consider using the ODS EXCLUDE statement to suppress the tables you don't want to see. Use ODS TRACE to determine the table names.

Contributor
Posts: 61

Re: How to suppress the tables that the HISTOGRAM statement creates?

Thanks a lot~

Solution
‎05-14-2014 02:58 PM
Super User
Posts: 17,963

Re: How to suppress the tables that the HISTOGRAM statement creates?

It really really really helps if you post that in the first place.

Use ODS SELECT to keep only the histogram.

ods select Histogram;

proc univariate data=sashelp.class noprint;

histogram weight height / normal;

run;

Contributor
Posts: 61

Re: How to suppress the tables that the HISTOGRAM statement creates?

Awesome!! It really works!

Thank you very much!!!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 10 replies
  • 479 views
  • 0 likes
  • 4 in conversation