Date: Fri, 13 Apr 2007 09:49:49 -0400
Reply-To: Rathindronath <mehedisas@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Rathindronath <mehedisas@YAHOO.COM>
Subject: A DATASET QUESTION - UPDATED PROBLEM - NOT A CLEANED DATA
Thanks for all your solutions from the bottom of my heart. But while I was
looking at the data more carefully I found it is really messed up it has
almost no patern other than I am looking for 'ONGO'or 'O/G' or 'ONGOING'
words anywhere in the charecter values.
I have a dataset as below:
Subject VariableUN
------- -----------
1 City Bus leaving -ONGO;
2 Cneter city, california
3 City center colosed-ONGO
4 Center city working- ONGO;
5 Uptown Bronx, New York;
6 Mall center Closed ONGO evryday
7 Bus Station-O/G;
8 Train Staion
9 Airport-ONGOING
I will need an output where variableUN contains 'ONGO'or 'O/G' or 'ONGOING'
and it can be anywhere in the value, since there is some serious Data
Cleaning issues.
If a value contains 'ONGO'or 'O/G' or 'ONGOING' anywhere in the value then
in the result we should have it as 'A' if not then 'B'. ( No need to worry
about if they are case sensitive, cause I will use UPCASE() function)
Need a Result as below:
Subject VariableUN
--------- -----------
1 A
2 B
3 A
4 A
5 B
6 A
7 A
8 B
9 A
Thanks again..