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 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 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