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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 908 views
  • 0 likes
  • 3 in conversation