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

Is there any way to increase the max number of groups for groups= option for BARCHART in the GTL? I seem to have hit the limit with 1092 groups. Interestingly proc sgplot doesn't seem to have the same limit.

R

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

ODS Graphics limits the number of discrete values or groups to 1000 to prevent runaway jobs, where a group or category role may be assigned a column (unintionally) that has a very large number of unique values.  These are controlled by the DISCRETEMAX and GROUPMAX options on the ODS GRAPHICS statement.  You can set these values to a higher level for your needs.

ods graphics / groupmax=1001;

http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#p0kroq43yu0lspn16hk1...

View solution in original post

7 REPLIES 7
Jay54
Meteorite | Level 14

ODS Graphics limits the number of discrete values or groups to 1000 to prevent runaway jobs, where a group or category role may be assigned a column (unintionally) that has a very large number of unique values.  These are controlled by the DISCRETEMAX and GROUPMAX options on the ODS GRAPHICS statement.  You can set these values to a higher level for your needs.

ods graphics / groupmax=1001;

http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#p0kroq43yu0lspn16hk1...

Sticky
Fluorite | Level 6

Thanks for this. I new there must be an option somewhere to increase this but its not mentioned in the error message or in the documentation for groups= . The only mention is in regard to increasing the memory available for ODS graphics. Also what is the limit for groups= in proc sgplot?

R

Jay54
Meteorite | Level 14

I don't expect any difference at all for this scatter plot use case.  I just ran this code for SG and GTL, and I got the exact same log message.

data scatter;
  do g=1 to 1001;
    x=ranuni(2);
    y=ranuni(2);
    output;
  end;
run;

ods html close;
ods listing;

proc sgplot data=scatter tmplout='c:\max.sas';   scatter x=x y=y / group=g; run; proc template;   define statgraph max;     begingraph;       layout overlay;         scatterplot x=x y=y / group=g;       endlayout;     endgraph;   end; run; /*ods graphics / groupmax=1001;*/ proc sgrender data=scatter template=max; run;
Sticky
Fluorite | Level 6

Looks like I had excluded some obs which meant the no groups dropped below 1000

R

SHUO
Calcite | Level 5

Thanks Sanjay for what a simple but hard found solution! I Have been searching the SAS Manual for a whole day but only found your answer here!!

JeanetteBottitta
SAS Employee

We are always looking to improve the documentation. I will update the GROUP= option in the next edition of the SAS ODS Graphics Procedures Guide with this information. Thank you!

Jay54
Meteorite | Level 14

Normally, the software will write a note to the log indicating when this has happened, and the name of the option you can use to fix the issue.  In this case the note is not logged, sorry about that.  I have opened a defect.

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
  • 7 replies
  • 6365 views
  • 3 likes
  • 4 in conversation