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.
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.
@ballardw has nailed it. That's the reason, I have nicknamed him the "Cop"
You mean the function kcompress()?
The function kcompress() is MBCS-aware.
The function compress() is not, it just considers individual bytes.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.