| Date: | Sun, 6 Nov 2011 19:24:16 -0500 |
| Reply-To: | Alison <alisontetler@YAHOO.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Alison <alisontetler@YAHOO.COM> |
| Subject: | Help in destringing mult vars then recoding into new indicator
vars |
|---|
Hi, I have about 30 variables with responses of varying length, all
character. For example, one person's value may be A while another's could
be AFEG - up to 8 characters long. They are basically compilations of a
number of conditions that a person reported, so can be any combination of
about 15 different options. I am looking to write a program that will take
each of these main variables, create the 15 new variables that will indicate
presence/absence of that symptom, have SAS scan through to see if that
particular character is within the response, and output the 1 or 0. At this
point I am destringing each variable and then recoding, but it is taking me
a long time and there is most certainly a more efficient and succinct way to
do this. Can anyone help?
Thank you all so much,
Alison
|