BookmarkSubscribeRSS Feed
RAmarapuram
Obsidian | Level 7

Hi Everyone,

 

I am facing issue with data pull from REDSHIFT using PROC SQL. The code errors out with "unable to transcode:".

 

I have viewed various posts regarding encoding option, but they talk about DATASET and filename. 

 

Can someone help me on this please ?

Appreciate your time on this.

2 REPLIES 2
ballardw
Super User

SAS, as well as all the other programs on your computer, uses some character set. One difference is that SAS allows you to specify, or in some cases override the specification, of the set used. You will have a default character set for your computer and depending on options chosen when SAS was installed one was selected as the default.

 

That's generic information.

Now you are attempting to access data that apparently contains characters from a set that your current setting in SAS does not like. The solution, in general, depends on two things:

What character set is the external data source using?

What is your current SAS session using?

 

Depending on the combination of answers to the two questions different solutions are possible.

Additionally how you "pull" data from an external source may have some impact as a specific SAS Access tool for that set may, or may not, attempt an automatic conversion.

 

When you answer those two questions then we may be able to provide specific answers.

It may help to provide the log of the code submitted and all the messages associated, Or screen shots if using a graphic interface to connect to the Redshift source, so that we can see the choices you already made.

SASKiwi
PROC Star

To check your SAS session encoding run this:

proc options option = encoding;
run;

Compare this with Redshift encoding. You could ask your Redshift DBA for this if you don't know.

 

Transcoding problems can happen if there is an encoding difference.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 574 views
  • 0 likes
  • 3 in conversation