Date: Tue, 27 May 2008 05:27:17 -0700
Reply-To: Yuewei <yueweiliu@VIP.QQ.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Yuewei <yueweiliu@VIP.QQ.COM>
Organization: http://groups.google.com
Subject: About ksubstrb and substr functions
Content-Type: text/plain; charset=ISO-2022-JP
Hi all !
I have a dataset like this:
data a;
input char $;
cards;
$BBg3$ (B
ab
a $BZ[ (B
$BL> (Bc
;
run;
I don't know whether the strings can be correctly displayed on your
computers, because there are some double byte charcters from Chinese
among them. I used the KSUBSTR function to pull the first character of
each string:
data b;
set a;
char1=ksubstr(char,1,1);
run;
I have also tried the SUBSTR and KSUBSTRB functions and found that
both of them could not be used for my destination. My question is
what's the difference between SUBSTR and KSUBSTRB funtions? Could you
give me some examples about them?
Thanks in advance !
Yuewei