Hi, Assuming that strings are given in the same fashion as mentioned in your problem statement, following code will help:- data have;
length add $ 1000;
add='123 Main Street, Los Angeles, California, 11000';
output;
add='123 North Main Street, Los Angeles, California, 11000';
output;
run;
data want;
set have;
house_no=substr(add,1,3);
street=substr(strip(scan(add,1,',')),4);
city=strip(scan(add,2,','));
state=strip(scan(add,3,','));
zipcode=strip(scan(add,4,','));
run; Please let me know if it helps. Regards, Abd.
... View more