SAS Procedures

Help using Base SAS procedures
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 1880 views
  • 0 likes
  • 4 in conversation