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
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
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?

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2651 views
  • 0 likes
  • 4 in conversation