BookmarkSubscribeRSS Feed
Helle
Calcite | Level 5
Hi,

I wanted to use PROC COPY for copying a dataset but received an error after submitting the following:

proc copy out=work in=ntsqlpro;
select LÅN_GARANTI;
quit;

ERROR: The value 'LÅN_GARANTI'n is not a valid SAS name.

I am running 9.1.3. I assume that it is because of the special character in the original dataset name. Is there a way to circumvent this or is it not possible to use PROC COPY with special characters? I googled the web for explanations but didn't come across any.

Thanks,

Helle
4 REPLIES 4
art297
Opal | Level 21
Works fine for me. My guess is that you have the wrong value set for your validvarname option.

Try options validvarname=v7 and see if that corrects the problem.

HTH,
Art
ArtC
Rhodochrosite | Level 12
It is hard to tell, but it looks like the A in LAN is not the standard English A. This would require VALIDVARNAME to be set to ANY. You may also need to write the SELECT statement as:
[pre]
select 'LAN_GARANTI'n;
[/pre]
where you use the A that is not on my keyboard.
Peter_C
Rhodochrosite | Level 12
Helle

you need to change the name of the table if you want to copy it into the WORK library. Although SAS/Access to a dbms supports complex names like your table, that flexibility is not present in the support of table names in the (base SAS) WORK library.
You might have more success with a simple data step, like[pre]DATA work.loan_garanti ;
set ntsqlpro."LÅN_GARANTI"n ;
run ;[/pre]
good luck
peterC
Helle
Calcite | Level 5
Hi,

In the end, I opted for the simple data step solution because I still received the same error message even after changing the options and modifying the code. Thanks for all your input.

Helle

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
  • 4 replies
  • 1108 views
  • 0 likes
  • 4 in conversation