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

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Early bird rate extended! Save $200 when you sign up by March 31.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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