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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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