BookmarkSubscribeRSS Feed
railfan1975
Fluorite | Level 6
I'm learning how to use PROC TEMPLATE to define a custom style. However, I'm getting an error I don't understand.

My code:
30 proc template;
31 define style styles.mystyle;
32 style table /
33 borderwidth = 1
34 bordercolor = red
35 color = blue
36 ;
37 end;
38 run;

The error:

30 proc template;
31 define style styles.mystyle;
32 style table /
33 borderwidth = 1
34 bordercolor = red
35 color = blue

_
22
76
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, ACTIVELINKCOLOR, BACKGROUND, BACKGROUNDIMAGE,
BORDERCOLOR, BORDERCOLORDARK, BORDERCOLORLIGHT, CONTRASTCOLOR, ENDCOLOR, FONT_FACE, FOREGROUND, IMAGE, LINKCOLOR,
NEUTRALCOLOR, POSTIMAGE, PREIMAGE, STARTCOLOR, VISITEDLINKCOLOR.
ERROR 76-322: Syntax error, statement will be ignored.
36 ;
37 end;
WARNING: Object will not be saved.
38 run;
4 REPLIES 4
Tim_SAS
Barite | Level 11
What SAS version? I think COLOR is not available until 9.2. Prior to that you use FOREGROUND, which I notice is one of the choices in the error message.
railfan1975
Fluorite | Level 6
Version 9.1.3

FOREGROUND will change the font color?
Cynthia_sas
SAS Super FREQ
Yes, in SAS 9.1.3, FOREGROUND is the correct attribute for the foreground color of the FONT.

To find the complete list, look in the SAS documentation for ODS under the topic: "Style Attributes and their Values".

cynthia
railfan1975
Fluorite | Level 6
It works! Thanks!

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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