BookmarkSubscribeRSS Feed
Khacho
Calcite | Level 5

Hello Everybody. I have an issue with encoding. I have more than one datasets that need to be encoded. My code working only for one dataset. If you know how to fix this let me know.

Khacho_0-1685978545977.png

 

2 REPLIES 2
Tom
Super User Tom
Super User

If you need to deal with characters strings that use many different encodings then make sure your SAS session is using UTF-8 as the session encoding.  Check the system option ENCODING.

 

The session encoding needs to be set before SAS starts.  So if you running from command line make sure to use command (or windows "icon") that uses the UTF-8 encoding.  Sometimes called "unicode support".   If you are using Enterprise Guide or SAS/Studio to submit code to SAS then make sure the application server you are connecting to is using UTF-8 encoding.

sbxkoenk
SAS Super FREQ

Determine the Encoding of your input Data Set
You can use PROC CONTENTS to determine the encoding of your data set.

The following code displays information about the data set header:

proc contents data=sashelp.class;
run;

Also, see here (the 3rd bullet has all the code needed) :

Koen

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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