Programming the statistical procedures from SAS

Error Code 22-322

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Error Code 22-322

[ Edited ]

Hello! I am trying to run a code to create a conditional graph for a 2-way table. I used the code from my professor, and the following error code was produced. What's wrong, and how can I fix it? I'm fairly new to SAS so as simple as possible please Smiley Happy

 

74 proc gchart data=online;
75 vbar response / group=type / freq=count;
                                                 -
                                                 22
                                                 200
NOTE: The previous statement has been deleted.
ERROR 22-322: Syntax error, expecting one of the following: ;, ANNOTATE, ASCENDING, AUTOREF,
CAUTOREF, CAXIS, CERROR, CFRAME, CFREQ, CLIPREF, CLM, COUTLINE, CPERCENT, CREF,
CTEXT, DESCENDING, DESCRIPTION, DISCRETE, ERRORBAR, FRAME, FREQ, FRONTREF,
G100, GAXIS, GROUP, GSPACE, HTML, HTML_LEGEND, IFRAME, IMAGESTYLE, INSIDE,
LAUTOREF, LEGEND, LEVELS, LREF, MAXIS, MEAN, MIDPOINTS, MINOR, MISSING, NAME,
NOAXIS, NOBASEREF, NOFRAME, NOLEGEND, NOSTATS, NOZERO, OUTSIDE, PATTERNID,
PERCENT, PERCENTSUM, RANGE, RAXIS, REF, SPACE, SUBGROUP, SUBOUTSIDE, SUM,
SUMVAR, TYPE, URL, WAUTOREF, WIDTH, WOUTLINE, WREF.
ERROR 200-322: The symbol is not recognized and will be ignored.
76 run;

ERROR: A HBAR, VBAR, HBAR3D, VBAR3D, STAR, PIE, PIE3D, DONUT or BLOCK statement must be given.
NOTE: The SAS System stopped processing this step because of errors.


Accepted Solutions
Solution
‎10-29-2016 05:05 PM
SAS Super FREQ
Posts: 3,306

Re: Error Code 22-322

Short answer: The slash means "options start here."  You can only have one slash on a statement.

 

Longer answer: You and your professor might enjoy using the newer graphics that are available with PROC SGPLOT. Many customers find that SGPLOT easier to get started with.  Here are two examples that use the VBAR statement. See the documentation for details.

 

proc sgplot data=sashelp.cars;
vbar origin / group=type freq=cylinders groupdisplay=stack;
run;

proc sgplot data=sashelp.cars;
vbar origin / group=type freq=cylinders groupdisplay=cluster;
run;

View solution in original post


All Replies
Solution
‎10-29-2016 05:05 PM
SAS Super FREQ
Posts: 3,306

Re: Error Code 22-322

Short answer: The slash means "options start here."  You can only have one slash on a statement.

 

Longer answer: You and your professor might enjoy using the newer graphics that are available with PROC SGPLOT. Many customers find that SGPLOT easier to get started with.  Here are two examples that use the VBAR statement. See the documentation for details.

 

proc sgplot data=sashelp.cars;
vbar origin / group=type freq=cylinders groupdisplay=stack;
run;

proc sgplot data=sashelp.cars;
vbar origin / group=type freq=cylinders groupdisplay=cluster;
run;
New Contributor
Posts: 2

Re: Error Code 22-322

Thank you!!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 198 views
  • 0 likes
  • 2 in conversation