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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 432 views
  • 0 likes
  • 3 in conversation