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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 744 views
  • 0 likes
  • 2 in conversation