BookmarkSubscribeRSS Feed
Siddhartha
Calcite | Level 5

While Importing TSV ( tab separated value) data as a SAS data set all the Danish letters are not appearing as the same.

I was using the following code:

proc import datafile='C:\Documents and Settings\Desktop\ExpMeet.tsv'
     out=base_data
     dbms=dlm
     replace;
     delimiter='09'x;
     datarow=2;
run;

Sample Data:

Siddhartha 

Helsinki 001/TelePresence || Lersø Parkalle 001/TelePresence

Bangalore 001/TelePresence ||Høje Taastrup 001/TelePresence

Anyone can help me in reading the Danish and swedish letters while importing .

Regards,

2 REPLIES 2
FriedEgg
SAS Employee

You need to change your encoding option on the import.  Since these are OS specific here is a link where you can find the one you need.

http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/viewer.htm#a002628552.htm

then do something like this:

filename in 'C:\Documents and Settings\Desktop\ExpMeet.tsv' encoding="uft-8";

proc import datafile=in
     out=base_data
     dbms=dlm
     replace;
     delimiter='09'x;
     datarow=2;
run;

Here is an additionaly resource which covers all of SAS's Language capabilities:

SAS(R) 9.2 National Language Support (NLS): Reference Guide

http://support.sas.com/documentation/cdl/en/nlsref/61893/HTML/default/viewer.htm#nlsrefwhatsnew902.h...

Ksharp
Super User

From your sample data, it looks like the delimiter is | or /, rather than  tab .

And make sure your encoding of sas session has already contained Danish and swedish

Ksharp

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2923 views
  • 0 likes
  • 3 in conversation