Desktop productivity for business analysts and programmers

ERROR 22-322: Syntax error, expecting one of the following: ;, CYCLEATTRS, DATA, DATTRMAP, DESCRIPTI

Reply
New Contributor
Posts: 2

ERROR 22-322: Syntax error, expecting one of the following: ;, CYCLEATTRS, DATA, DATTRMAP, DESCRIPTI

I am using SAS EG 7.1 on the server installed with SAS 9.4.

 

The codes could be run on SAS9.3. But got the error:

ERROR 22-322: Syntax error, expecting one of the following: ;, CYCLEATTRS, DATA, DATTRMAP, DESCRIPTI.

 

The codes in the eiditor is like:

proc sgplot data=out_data(where=(pd_Seg='Term')) pctlevel=group;

vbar dist_yyq/ response=dist_yearqr stat=percent name="vbar" grouporder=ascending

group=ltv_grp;

keylegend "vbar"/sortorder=ascending;

xaxis fitpolicy=thin;

run;

 

What is the problem? Is that caused by running 9.4?

Respected Advisor
Posts: 4,820

Re: ERROR 22-322: Syntax error, expecting one of the following: ;, CYCLEATTRS, DATA, DATTRMAP, DESCR

Earlier versions of SAS 9.4 didn't recognize option sortorder= in the keylegend statement.

PG
New Contributor
Posts: 2

Re: ERROR 22-322: Syntax error, expecting one of the following: ;, CYCLEATTRS, DATA, DATTRMAP, DESCR

Hi PG,

Thanks for you reply.

It seems that the version I am using could not recognize many options. I copied the log files in the following:
proc sgplot data=out_data(where=(pd_Seg='Term')) pctlevel=group;
________
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, CYCLEATTRS, DATA, DATTRMAP, DESCRIPTION, NOAUTOLEGEND, NOCYCLEATTRS,
PAD, SGANNO, TMPLOUT, UNIFORM.

ERROR 76-322: Syntax error, statement will be ignored.

25 vbar dist_yyq/ response=dist_yearqr stat=percent name="vbar" grouporder=ascending
_______
22
76
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR 22-322: Syntax error, expecting one of the following: FREQ, MEAN, SUM.
ERROR 76-322: Syntax error, statement will be ignored.
26 group=ltv_grp;
27 keylegend "vbar"/sortorder=ascending;
_________
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, ACROSS, BORDER, DOWN, LOCATION, NOBORDER, POSITION, TITLE,
TITLEATTRS, VALUEATTRS.
ERROR 76-322: Syntax error, statement will be ignored.
28 xaxis fitpolicy=thin;
29 run;

In order to solve for this problem. Do you have any recommendation? Thanks a lot.
Respected Advisor
Posts: 4,820

Re: ERROR 22-322: Syntax error, expecting one of the following: ;, CYCLEATTRS, DATA, DATTRMAP, DESCR

Solve errors in the order in which they appear. Fixing the first error will often remove many subsequent error messages.

 

In the future, use the {i} tool to paste SAS output, it provides better formatting.

PG
Ask a Question
Discussion stats
  • 3 replies
  • 672 views
  • 0 likes
  • 2 in conversation