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

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~

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

10 REPLIES 10
ballardw
Super User

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

Tiny_Kane
Obsidian | Level 7

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;

ballardw
Super User

Probably time to use a different procedure such as Prog SGPLOt

Tiny_Kane
Obsidian | Level 7

Thanks for your suggestion.

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

Anyway, thanks~

Reeza
Super User

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;

Tiny_Kane
Obsidian | Level 7

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;

Tim_SAS
Barite | Level 11

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

Reeza
Super User

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;

Tiny_Kane
Obsidian | Level 7

Awesome!! It really works!

Thank you very much!!!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 10 replies
  • 10327 views
  • 0 likes
  • 4 in conversation