The SAS Output Delivery System and reporting techniques

PROC TEMPLATE Error

Reply
Occasional Contributor
Posts: 15

PROC TEMPLATE Error

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;
Super Contributor
Posts: 394

Re: PROC TEMPLATE Error

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.
Occasional Contributor
Posts: 15

Re: PROC TEMPLATE Error

Version 9.1.3

FOREGROUND will change the font color?
SAS Super FREQ
Posts: 8,742

Re: PROC TEMPLATE Error

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
Occasional Contributor
Posts: 15

Re: PROC TEMPLATE Error

It works! Thanks!
Ask a Question
Discussion stats
  • 4 replies
  • 119 views
  • 0 likes
  • 3 in conversation