BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alissapsalazar
Calcite | Level 5

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 🙂

 

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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

2 REPLIES 2
Rick_SAS
SAS Super FREQ

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;
alissapsalazar
Calcite | Level 5

Thank you!!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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