BookmarkSubscribeRSS Feed
ahirt845
Calcite | Level 5

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


keylegend.jpg
5 REPLIES 5
mohamed_zaki
Barite | Level 11

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.

ahirt845
Calcite | Level 5

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.

Cynthia_sas
SAS Super FREQ

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

ballardw
Super User

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.

ahirt845
Calcite | Level 5

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1223 views
  • 0 likes
  • 4 in conversation