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
It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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-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!

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.

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