Very quick question on the KEYLEGEND statement.
Is the KEYLEGEND text always red when you type it into SAS? Since (I thought) red text indicates something isn't right, I'm wondering why it's doing that. It seems to work regardless so I suppose it isn't a big deal, but I wonder why it would be red (I have a minor case of OCD).
I have attached a screenshot to this message. The example is from the SAS help notes.
Thanks!
Alex
I am using SAS 9.2 and i found that:
If you are using the SAS editor you get this keyword in red.
but if you are using Enterprise Guide you will find it blue as normal.
and you will get in both the same result.
That's what I've found too. I'm using 9.3.
I wonder why KEYLEGEND is red. It works just fine, but I wonder what the reasoning behind it is.
Hi:
Usually when you see red, but the code still works, it means that some syntax didn't make it into the color-coding dictionary. If the code runs correctly then don't worry about it. The color-coding eventually catches up with the word in later releases.
cynthia
If you don't want them to appear as red you can go to Tools> Options> Enhanced Editor Options > General. Click on "User Defined Keywords" and add items there. You user defined keywords will appear in the color and background set in the Appearance tab in the "File elements" window for SAS Program file type.
When I click "Enhanced Editor" SAS completely freezes up until I have to go into the task manager on my computer and end the program. Does anyone else have this issue or is it just me? Very puzzling, I wonder what's going on.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: