Desktop productivity for business analysts and programmers

Red code - Do I have the required products?

Reply
Contributor
Posts: 40

Red code - Do I have the required products?

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?
Contributor
Posts: 40

Re: Red code - Do I have the required products?

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?
Trusted Advisor
Posts: 2,114

Re: Red code - Do I have the required products?

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.
Community Manager
Posts: 2,889

Re: Red code - Do I have the required products?

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
Contributor
Posts: 40

Re: Red code - Do I have the required products?

Ah, that explains it, thanks :-)
Occasional Contributor
Posts: 18

Re: Red code - Do I have the required products?

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?

Ask a Question
Discussion stats
  • 5 replies
  • 847 views
  • 0 likes
  • 4 in conversation