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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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