BookmarkSubscribeRSS Feed
4301
Calcite | Level 5

RROR 22-322: Syntax error, expecting one of the following: ;, (, COMPRESS, DATA, FC,
FORMCHAR, NLEVELS, NOPRINT, ORDER, PAGE.
ERROR 202-322: The option or parameter is not recognized and will be ignored

 

 

*unadjusted association;
proc freq data=gene env;
table hstatus*cannabis/nopercent nocol cmh;
run;

1 REPLY 1
ballardw
Super User

When referencing an error please copy from the log the entire procedure along with all the messages for the step that throws the error. Then paste into a code box on the forum opened using the {I} icon. The code box will preserve formatting of the error messages and many will generate an underscore or two showing where the syntax issue was encountered.

 

For instance in your case I suspect you have a more complete log entry similar to :

39   proc freq data=gene env;
                         ---
                         22
                         202
ERROR: File USER.GENE.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: ;, (, COMPRESS, DATA, FC, FORMCHAR,
              NLEVELS, NOPRINT, ORDER, PAGE.
ERROR 202-322: The option or parameter is not recognized and will be ignored.

This indicates that you have a space in the middle of your data set name, whether it was supposed to GENEENV or GENE_ENV or similar. Fix the data set name. ENV by itself is not an option of Proc Freq hence the wording of :

ERROR 22-322: Syntax error, expecting one of the following: ;, (, COMPRESS, DATA, FC, FORMCHAR, NLEVELS, NOPRINT, ORDER, PAGE. 

Please notice that there are 3 underscore characters under the word ENV in the error message. Which is pretty clear about indicating that is not a valid option.

 

The Entire procedure or data step is needed because sometimes the error cause actually can come from something missing in lines above the reported location. 

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 200 views
  • 0 likes
  • 2 in conversation