BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cruise
Ammonite | Level 13

@ballardw 

data WORK.URBANICITY;
  infile datalines dsd truncover;
  input Municipality:$36. urbanicity:COMMA15.;
  format urbanicity COMMA15.;
  label Municipality="Municipality" urbanicity="urbanicity";
datalines;
Seoul 605,569,314
   Jongno-gu 23,972,507
   Jung-gu 9,974,292
   Yongsan-gu 21,870,000
   Seongdong-gu 16,804,426
;;;;

Hope I got the guidance right. This is the data I'm dealing with. 

ballardw
Super User

Repeats of the same 3 characters is making me think that your actual data may be DBCS.

 

And perhaps the KCOMPRESS, KTRIM may be wanted.

novinosrin
Tourmaline | Level 20

@ballardw  has nailed it. That's the reason, I have nicknamed him the "Cop"

Cruise
Ammonite | Level 13

 

@ballardw kcomp.png

You hit the nail on the head! kcomp it is. Hurray!

ChrisNZ
Tourmaline | Level 20

Searching for   ã€€   brings up   ã€€ 文字化け

So MBCS indeed.

Cruise
Ammonite | Level 13
Why then kcomp would have worked out?
ChrisNZ
Tourmaline | Level 20

You mean the function kcompress()?

The function kcompress() is MBCS-aware. 

The function compress() is not, it just considers individual bytes.

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 21 replies
  • 1341 views
  • 7 likes
  • 6 in conversation