BookmarkSubscribeRSS Feed
EinarRoed
Pyrite | Level 9

I've got a SAS-job that extracts data from multiple sources, including Netezza. It runs successfully when I execute it in Enterprise Guide.

 

However when this program is executed via the daily batch, all special characters (notably æ, ø, å) that are loaded from Netezza into the target table appear like '?'.

 

The daily batch executes the SAS-job via SSIS. The target table is on SQL Server.

 

Do you have any advice on how I can resolve this issue? I want the special characters to appear as they are. Do I need to include some kind of encoding logic in the SAS-job?

2 REPLIES 2
Anand_V
Ammonite | Level 13

Hi @EinarRoed 

 

You can start by verifying if SAS session encoding value is same when executed from EG and via batch.

Below proc can fetch this information in SAS log.

 

proc options option=encoding; run;
EinarRoed
Pyrite | Level 9

Thanks! The business user is going to insert it into his script and make the comparison.

 

In the meantime there's a bigger problem.

 

We know that the SAS-script executed in the daily batch uses LATIN-9 (ISO-8859-15) encoding. We also know that the SQL Server target database uses "Danish_Norwegian_CI_AS" encoding/collation. Yet all occurrences of ÆØÅ from the various sources appear as '?' in SQL Server.

 

Is there a kind of conflict/inconsistency between how LATIN9 and "Danish_Norwegian_CI_AS" treats ÆØÅ? If so, I'd appreciate any suggestions on how to resolve it. I assume we'll need some kind of encoding logic in the SAS-script.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2 replies
  • 587 views
  • 1 like
  • 2 in conversation