Date: Fri, 2 Nov 2001 17:30:58 -0500
Reply-To: Tom Frenkel <taf2@NYU.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tom Frenkel <taf2@NYU.EDU>
Subject: Re: Wow! - Thanks - RE: Simple Base SAS Qn.
Content-Type: TEXT/PLAIN; charset=US-ASCII
Just don't use the LENGTH function to check how many Y's are left. Even
if all the characters are gone, you would still get a value of 1! In
other words, the LENGTH function returns a value of 1 for a "missing"
Tom Frenkel <firstname.lastname@example.org>
> > you could compress out all letters other than Y and
> > test the length, ie
> > number of characters remaining.
> > How to count # of times a particular letter
> > appears in a string.
> > For Example: I need to count how many Ys are in the
> > string
> > 'NNNNYNNNNNNYYYNYYYNNYNNYNNNNYYYNNYYY'