BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Does anyone know how to fix this error?
Thank you.

15 proc template;
16 define style styles.test;
17 parent=styles.default;
18 style Contentitem from Indexitem /
19 hreftarget=’_blank’;
_
22
76
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, !, @,
DYNAMIC, EXPRESSION, RESOLVE, SYMGET, _UNDEFINE_, _UNDEF_, _UND_.
ERROR 76-322: Syntax error, statement will be ignored.
20 end;
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
This is not really an ODS GRAPHICS question, however, check your code VERY carefully for the type of quote character. If you cut and pasted the code from this Tech Support note, http://support.sas.com/kb/23/437.html
it has "slanted" quotes, which cause the error message. If you type over the "slanted" quotes with straight quotes, you do not get the error message, as shown in my log, below.

cynthia
[pre]
838 proc template;
839 define style styles.test;
840 parent=styles.default;
841 style Contentitem from Indexitem /
842 hreftarget='_blank';
843 end;
NOTE: STYLE 'Styles.Test' has been saved to: SASUSER.TEMPLAT
844 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.04 seconds
cpu time 0.01 seconds


845 ** "bad" quotes;
846 proc template;
847 define style styles.test;
848 parent=styles.default;
849 style Contentitem from Indexitem /
850 hreftarget=’_blank’;
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,
a format name, !, @, DYNAMIC, EXPRESSION, RESOLVE, SYMGET, _UNDEFINE_,
_UNDEF_, _UND_, |.
ERROR 76-322: Syntax error, statement will be ignored.
851 end;
WARNING: Object will not be saved.
852 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.37 seconds
cpu time 0.00 seconds

WARNING: Errors were produced.
NOTE: The SAS System stopped processing this step because of errors.

[/pre]

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
  • 1 reply
  • 816 views
  • 0 likes
  • 2 in conversation