Date: Fri, 8 Jun 2001 11:37:31 -0500
Reply-To: "Gregg P. Snell" <email@example.com>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Gregg P. Snell" <gsnell@DATASAVANTCONSULTING.COM>
Organization: Data Savant Consulting
Subject: Re: searching for a character in a character field
Content-Type: text/plain; charset="iso-8859-1"
Here is just one example that will count the names, though it assumes the
field always has at least one name.
I have no idea what your fields might contain if not names, so you will
definitely have to tweak this to your own data. But it should give you
something to start with...
Gregg P. Snell
Data Savant Consulting
(208) 977-1943 fax
Co-chair of MWSUG 2001
Melanie Barish <melanie.barish@CLINARC.COM> wrote in message
> Hello SAS-L,
> I need to search 6 fields (drug1 - drug6) to identify how many of the 6
> actually have a name in them. However, some have more than one name,
> seperated by a slash. Is there a SAS function that I can use to count how
> many times in a given field that the slash appears? I looked up INDEX and
> SCAN, but they both appear to only return the location of the slash, not
> many times it is found. Any suggestions would be greatly
> appreciated...thank you in advance for your help.
> Melanie J. Barish
> Clinical Data Manager