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.
... View more