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
AnandVyas
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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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