BookmarkSubscribeRSS Feed
don21
Quartz | Level 8
Hi Tom,

Thankyou for the inputs but, still the query fails due to the file names .

Error:
11 + proc import datafile= " ." out= RM Deliquent Repayment Exception (label= " ." ); run;
_________
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, (, DATAFILE, DATATABLE, DBMS, DEBUG, FILE, OUT, REPLACE, TABLE,
_DEBUG_.

ERROR 76-322: Syntax error, statement will be ignored.
andreas_lds
Jade | Level 19

The string "RM Deliquent Repayment Exception" is not a valid name.  You will need to add code to sanitize the sheet-name so that it can be used as dataset-name. The functions compress and translate will be useful. You should check if two different filenames have the same cleaned name to avoid overwriting already imported files.

Reeza
Super User

SAS file names are 32 characters in length, start with a letter or underscore and can only contain alphanumeric characters and underscores, no spaces. Your names don't align with that. You can use longer names with spaces but then you also need to type it out that way every time and as a programmer I would never recommend that. It's a major PITA.

 

I'm not sure if you didn't put a file name or removed it from the log...but it shouldn't be a period for sure.

 


@don21 wrote:
Hi Tom,

Thankyou for the inputs but, still the query fails due to the file names .

Error:
11 + proc import datafile= " ."  out= RM Deliquent Repayment Exception (label= " ." ); run;
_________
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, (, DATAFILE, DATATABLE, DBMS, DEBUG, FILE, OUT, REPLACE, TABLE,
_DEBUG_.

ERROR 76-322: Syntax error, statement will be ignored.

 

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 17 replies
  • 2245 views
  • 0 likes
  • 5 in conversation