BookmarkSubscribeRSS Feed
NicolaD
Calcite | Level 5
I came across some code on here that I want to have a play with to learn how to do overlaid box plots and when I paste it into EG some of the code goes red. I'm wonderign if this is because I don't have the required products. The code is as follows:

proc template;
define statgraph boxplots;
begingraph;
layout overlay;
boxplot y=weight x=age / datatransparency=0.5 fillattrs=GraphData1 name="box1" legendlabel="Weight";
boxplot y=height x=age / datatransparency=0.5 fillattrs=GraphData2 name="box2" legendlabel="Height" yaxis=y2;
discreteLegend "box1" "box2";
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.class template=boxplots; run;

the bits in bold are what is going red in my program.

I have checked the properties of the SASapp server and sas/Graph is installed and licensed, do I need my administrator to assign it to my log on to grant me permission to use sas/graph or something like that or is there something else I need to execute this code?
5 REPLIES 5
NicolaD
Calcite | Level 5
I tried to run the code anyway to see what errors it would give me and it executed fine - I assumed red code wouldn't work. Can anyone tell me why the code goes red but still executes ok?
Doc_Duke
Rhodochrosite | Level 12
The SAS editor is designed to recognize most of the SAS code for syntax. Apparently, it does not recognize the PROC TEMPLATE statements. I know there was a lot of work in the editor for EGuide 4.3, so maybe we'll see it covered then.
ChrisHemedinger
Community Manager
Doc has it correct. The red keywords you see represent newer syntax that the editor has not caught up with. The 4.3 version of EG has all of these built in, plus much more (such as the new 9.22 syntax supported by SAS/STAT, ETS, and OR).

http://support.sas.com/rnd/app/AnalyticalProducts922.html

Chris
SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
NicolaD
Calcite | Level 5
Ah, that explains it, thanks 🙂
macroCharlie
Calcite | Level 5

Ah, here it is January 2013 and my 9.3 editor still shows style, replace and class as red in proc template.

They show as blue in EG 5.1.

Are they planning on updating the enhanced editor?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 5 replies
  • 3310 views
  • 0 likes
  • 4 in conversation