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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

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