LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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
Comments: To: sas-l@uga.edu
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


Back to: Top of message | Previous page | Main SAS-L page