I have a data set which could have invalid characters
I need to take every obs which has a invalid character like &! etc and put the whole obs in data set and the rest in another.
Here is what I have so far
proc sql ;
create table structures2 as
select trim(CLIENT_NAME||trim(SEGMENT)||trim(ANALYSIS_YEAR)||trim(STRUCTURE_CODE)||trim(INCLUDE)||
trim(OPERATIONAL_ID)||trim(ANALYST))
as FALIST
from structures ;
quit;
*MAKE TWO DATASETS, ONE WITH GOOD DATA & ONE WITH BAD DATA;
data good bad;
set WORK.structures2;
if (verify(FALIST,'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.'))
then output good;
else output bad;
run;
Michael
I need to take every obs which has a invalid character like &! etc and put the whole obs in data set and the rest in another.
Here is what I have so far
proc sql ;
create table structures2 as
select trim(CLIENT_NAME||trim(SEGMENT)||trim(ANALYSIS_YEAR)||trim(STRUCTURE_CODE)||trim(INCLUDE)||
trim(OPERATIONAL_ID)||trim(ANALYST))
as FALIST
from structures ;
quit;
*MAKE TWO DATASETS, ONE WITH GOOD DATA & ONE WITH BAD DATA;
data good bad;
set WORK.structures2;
if (verify(FALIST,'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.'))
then output good;
else output bad;
run;
Michael