| Date: | Thu, 3 Nov 2011 17:08:15 -0400 |
| Reply-To: | Venky Chakravarthy <sasyellvenky@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Venky Chakravarthy <sasyellvenky@GMAIL.COM> |
| Subject: | Re: Special Characters |
|
| In-Reply-To: | <201111032041.pA3JVSUP030408@waikiki.cc.uga.edu> |
| Content-Type: | text/plain; charset=UTF-8 |
Have you tried using the ANYCNTRL function.
http://support.sas.com/documentation/cdl/en/lefunctionsref/63354/HTML/default/viewer.htm#p1mt339n2zhb33n1uejmw7470orv.htm
Venky Chakravarthy
On Thu, Nov 3, 2011 at 4:41 PM, Singh <adsingh78@gmail.com> wrote:
> Hi,
>
> Is there a way to output only those observations and only those variables
> in a SAS dataset that have special characters?
>
> HAVE:
>
> id(N) var1(C) var2(C) var3(C)
> 101 Klean-Prepā„¢ diabetes Nutritional Supplement
> 102 lanzor Health Suppelment lidocaĆÆne
> 103 L-Tyrox 50 µg fish oil supplement lopéramide (Imodium)
>
> WANT:
>
> id(N) var1(C) var3(C)
> 101 Klean-Prepā„¢ Nutritional Supplement
> 102 lanzor lidocaĆÆne
> 103 L-Tyrox 50 µg lopéramide (Imodium)
>
> I am using the following code, but this does not work as I get error
> message:
> ERROR: Some character data was lost during transcoding in the dataset
>
> data want;
> set have;
> if compress(lowcase(var1),'abcdefghijklmnopqrstuvwxyz') eq '' then
> delete;
> run;
>
>
>
> Thanks in advance!!
>
|