BookmarkSubscribeRSS Feed
mdavidson
Quartz | Level 8
I'm getting the following error when trying to create a .csv file from a dataset with character and numeric column names (name, 2008,2009). Is there any way around this, other than exporting to .xls?



NOTE: SCL source line.
52 format 2008 best12. ;
____ _______
22 201
NOTE: SCL source line.
53 format 2009 best12. ;
____ _______
22 201
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, DEFAULT, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_.

ERROR 201-322: The option is not recognized and will be ignored.
2 REPLIES 2
mdavidson
Quartz | Level 8
Another note, when I export using the export wizard built into SAS the file will export perfectly. It's when I'm trying to export via code is where my process fails out. Unfortunately, there is no preview within EG that will allow me to see the code generated when using the export wizard.
Doc_Duke
Rhodochrosite | Level 12
EGuide, by default, uses the OPTION VALIDVARNAME=ANY. If you use that variable in a procedure that does surface the code, you will see that the variable name is referenced as "2008"n . You also need to reference non-standard names that way. See the SAS/Base manual for the section on reverencing variable names.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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