BookmarkSubscribeRSS Feed
Rick_SAS
SAS Super FREQ

Have you ever noticed that sometimes a SAS editor displays a statement in red, which indicates that the color-coder does not recognize that statement? You look it up in the doc and---sure enough!---the statement is valid! You submit the code and---sure enough!---the program runs!

 

Help SAS improve its editor by telling the developers what valid statement are displayed in red. Respond to this message and state 

the name of the procedure and the statement that is displayed in red. A valid example would also be helpful.

 

To get started, here's one I found:

PROC UNIVARIATE, the CDFPLOT statement:

 

proc univariate data=sashelp.cars;
var mpg_highway;
cdfplot mpg_highway;
run;

 I will "like" responses for which the color-coding is wrong in the latest release of SAS (currently 9.4m4).

27 REPLIES 27
RW9
Diamond | Level 26 RW9
Diamond | Level 26

TBH they should rip the "Enhanced Editor" out and put a proper IDE in its place, EE was version 8.  

Rick_SAS
SAS Super FREQ

The topic of this thread is reporting issues with the color-coder (enhanced editor, Enterprise Guide, or SAS Studio). Please open a separate thread if you want to discuss editors, GUIs. IDEs, or other topics. 

mkeintz
PROC Star

I had misremembered this topic as a request for examples of any erroneous color codes in the editor interface.

 

It's just for unjustified RED's, but now that I've asked for and received the location of this topic (thanks Rick), here's an incorrect blue in windows enhanced editor 9.4 TSm3  (but not in sas/studio 3.6)

 

   proc tabulate data=sashelp.class  weight ;

 

 

"weight" is not an option on the proc tabulate statement, but is shown in blue in the editor.   (There is a separate WEIGHT statement for proc tabulate).

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Rick_SAS
SAS Super FREQ

Thanks, Mark. I think this is because WEIGHT is a valid keyword for the VARDEF= option. The color-coding algorithm seems to be overzealous for TABULATE, SUMMARY, and MEANS. It also displays DF, N, and WDF in blue:

proc summary data=sashelp.class vardef=weight;  /* or N or DF or WDF */

 

 

mkeintz
PROC Star

Ah yes. thx.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
BethE
Calcite | Level 5

Might not be relevant here, but the 'where' statement in proc freq is now showing up as red in Enterprise Guide 7.1

PeterClemmensen
Tourmaline | Level 20

The Convert Statement of PROC EXPAND is red in my editor

 

proc expand data=somedata out=someotherdata;
   by var1;
   id var2;
   convert var3=lead_var3 / transformout=(lead 1);
run;

Capture.PNG

 

xusally86
Calcite | Level 5

proc reg data=sp4r.bodyfat;
model weight = height neck chest;
store mymod;
run;quit;

 

store in red in my editor. Sas 9.4

Please tell me how to solve this problem, thanks.

SASKiwi
PROC Star

The incorrect colour coding in your SAS editor is a bug that can only be corrected by SAS. The code will still run correctly.

xusally86
Calcite | Level 5
Actually, the model cannot be used for score the new data.After I run the score statement, the predicted column is empty. I tried many times, it does not work.
SASKiwi
PROC Star

That is a different issue. If you want help with that I suggest you open a new post.

scottyk
Calcite | Level 5
Procedure: SGPLOT Statement: BY The BY statement works as expected (dummy program attached), but stays red. I have looked around online, but so far have not found any other indications of this from others. Thank you.
LoriK
Fluorite | Level 6

/*partial snippet of code within ods tagsets.excelXP file="x.xml"*/

 

ods tagsets.ExcelXP options(sheet_name='Volag');

 

proc print data=clean noobs;
where volag =' ' and (fy= &fy and _trimester=&tri);
var case_nbr Last_Name First_Name dob Date_arrival year_arrival screening_date Agency_Name ;
title 'Please update in the database. These are either missing or incorrect.';
format screening_date mmddyy8.;
run;

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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