03-11-2014 09:38 AM
I have a long list of colors, set in GOPTIONS
goptions colors=(black red green blue cyan magenta orange lightblue limegreen purple brown yellow salmon
darkgreen pink turquoise tan olive firebrick slateblue orangered yellowgreen teal gray44 blueviolet
crimson chocolate darkmagenta gold silver peru plum powderblue tomato olivedrab lavender khaki darkgray
cornsilk deepskyblue deeppink goldenrod);
Then I try to obtain this same list of colors in a macro variable for use in the program:
and the resulting macro variable is
( BLACK RED GREEN BLUE CYAN MAGENTA ORANGE LIGHTBLU LIMEGREE PURPLE BROWN YELLOW SALMON DARKGREE PINK TURQUOIS TAN OLIVE
FIREBRIC SLATEBLU ORANGERE YELLOWGR TEAL GRAY44 BLUEVIOL CRIMSON CHOCOLAT DARKMAGE GOLD SILVER PERU PLUM POWDERBL TOMATO
I understand why the color names are maximum eight characters, that's fine, not a problem. I do not understand why the macro variable ends with laven (lavender) and doesn't include the remaining colors.
What is the problem here? How do I fix this?
03-11-2014 09:45 AM
I would say you've hit a maximum length for macro variables there $2000. Have a look in SASHELP.VGOPT dataset, you can find COLORS option there, I would expect more than one, try processing from that rather than assign to macro var.
03-11-2014 09:54 AM
Maybe it is a limit with GETOPTION, seems like the limit might be 256 characters
Nevertheless, I can get the information out of the SASHELP.VGOPT table
03-11-2014 10:10 AM
A related limit ... but not the one you are running into ... within SASHELP.VGOPT, the variable SETTING which holds the colors list is limited to 1024 characters.
03-11-2014 10:25 AM
VGOPT SETTINGS contains something even more bizarre when I ran it.
( BLACK RED GREEN BLUE CYAN MAGENTA ORANGE LIGHTBLU E LIMEGREE N PURPLE BROWN YELLOW SALMON DARKGREE N PINK TURQUOIS E TAN OLIVE FIREBRIC K SLATEBLU E ORANGERE D )
03-11-2014 10:39 AM
I can only see the "correct" (truncated to 8 byte words) list with PROC GOPTIONS.
03-11-2014 10:52 AM
Yes i see too it like so
searching color name i have found that in the register you have colors in short for the html colors
but only for G O P green orange and purple
03-11-2014 11:40 AM
Paige is wondering if you should report this as a bug, and see what SAS has to say ... it sure seems like a bug to me ... of course, if this is not something you would ever need in your work then you may not want to bother
03-11-2014 12:09 PM
You seem to have hit the limit on the COLORS option. What use do you have for so many colors? I doubt that any graph produced with so many colors would be readable by humans.