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 (June 2000, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 26 Jun 2000 16:12:29 GMT
Reply-To:   sashole@mediaone.net
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Paul Dorfman <paul_dorfman@HOTMAIL.COM>
Subject:   Re: [Fwd: [Fwd: Substring command]]
Comments:   To: ralsbroo@CCEB.UPENN.EDU
Content-Type:   text/plain; format=flowed

Rob,

You must have forgotten the instruction like

where descript = 'pain';

in the procedure you are running.

Kind regards, ===================== Paul M. Dorfman Jacksonville, FL =====================

>From: Robert Alsbrooks <ralsbroo@CCEB.UPENN.EDU> >Reply-To: Robert Alsbrooks <ralsbroo@CCEB.UPENN.EDU> >To: SAS-L@LISTSERV.UGA.EDU >Subject: [Fwd: [Fwd: Substring command]] >Date: Mon, 26 Jun 2000 11:54:39 -0400 > >Hi Everyone, > >If any one can give a solution to this problem we would appreciate it. > >Rob > >Jesse Chittams wrote: > > > Robert, > > > > Please post this with the SAS discussion group. > > > > thanks, > > -Jesse C. > > ---------------------------------------------------------------- > > > > Subject: Substring command > > Resent-From: bac@cceb.upenn.edu > > Date: Thu, 15 Jun 2000 13:10:10 -0400 > > From: "Jill Santanna" <jsantann@cceb.upenn.edu> > > To: bac <bac@cceb.upenn.edu> > > > > I have been trying to use the substring command to partially > > categorize a text field. For some reason it has been doing crazy > > things. > > > > Attached is a bit of text and the results that it gave. If anyone can > > give me some insight as to why this is not working the way you would > > expect, please let me know. > > > > The free text field is called reason. I am trying to lump any entry > > that starts with the word pain into a category called pain. > > > > I used the command.. > > > > if substr(reason,1,4)='pain' then descript='pain'; > > > > and got the attached output. I was expecting only the categories that > > start with the word pain to be included. Does anyone know why all of > > the things not starting with the word pain were included as well? > > > > Thanks! > > > > Jill > > > > ---------------------------------------------------------------- > > > > The SAS System > 34 > > 10:50 Thursday, June >15, 2000 > > > > ------------------------------- DESCRIPT=PAIN >-------------------------------- > > > > Cumulative > > REASON Frequency Frequency > > ------------------------------------------------------ > > arm + shoulder pain 1 1 > > blood in urine 17 18 > > chest pain 68 86 > > chest pain + breathing problem 1 87 > > chest pain + problem breathing 1 88 > > fell + shoulder pain 1 89 > > pain 32 121 > > pain + 1 122 > > pain + blood in urine 1 123 > > pain + disoriented 1 124 > > pain + medical question 1 125 > > pain + needs medication 1 126 > > pain + problem breathing 1 127 > > pain + throbbing from cellul 1 128 > > pain after by pass surgery 1 129 > > pain all over 1 130 > > pain around eye 1 131 > > pain from surgery 1 132 > > pain in abdomen 1 133 > > pain in abdominal + pregnant 1 134 > > pain in arm 4 138 > > pain in arm + neck 1 139 > > pain in arms 1 140 > > pain in back 2 142 > > pain in back + lightheadedness 1 143 > > pain in back + stomach 1 144 > > pain in back of head 1 145 > > pain in backside 1 146 > > pain in buttocks 1 147 > > pain in chest 5 152 > > pain in chest + rib cage 1 153 > > pain in colon 1 154 > > pain in ear 1 155 > > pain in eyes + head 1 156 > > pain in face 1 157 > > pain in feet 2 159 > > pain in foot 1 160 > > pain in groin 3 163 > > pain in head 1 164 > > pain in hip 2 166 > > pain in knee 2 168 > > pain in leg 2 170 > > pain in legs 3 173 > > pain in limbs + back 1 174 > > pain in lower back 1 175 > > pain in lower chest 1 176 > > pain in lower side for weeks 1 177 > > pain in ribs 1 178 > > pain in shoulder 1 179 > > pain in side 14 193 > > > > > > > > The SAS System > 35 > > 10:50 Thursday, June >15, 2000 > > > > ------------------------------- DESCRIPT=PAIN >-------------------------------- > > > > Cumulative > > REASON Frequency Frequency > > ------------------------------------------------------ > > pain in stomach 3 196 > > pain in stomach + back 1 197 > > pain in waist 1 198 > > pain of rib cage 1 199 > > pain on both sides 1 200 > > pain on side 2 202 > > pain under rib 1 203 > > pain under shoulder blade 1 204 > > pain under sternum 1 205 > > pain when walking 1 206 > > pain with urination 4 210 > > painful toe with discoloration 1 211 > > painful urination 3 214 > > shoulder + arm pain 1 215 > > shoulder + back + rib pain 1 216 > > shoulder pain 17 233 > > > > > > > > x > >

________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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