Please help me, a novice SAS user, figure this one out!
I have a variable (PERMITCL) that I need to recode. There are a few problems, however. First, the variable is different for almost every observation. Second, the length of the variable is also different in some cases.
Here are a few examples of observations:
01-01IIP
05-04
19-06ID
07-05
IIP
I want to know how many observations contain IIP.
I've tried using:
where prxmatch("m/IIP/oi", PERMITCL);
This is fine to some extent, but I'm still not happy with it. First, it doesn't keep any of the other observations; I'd prefer to keep them as zeroes or another identifier for later. Second, I still can't easily see how many total IIPs there are; a table yields a different line for each ##-##IIP and plain IIP.
How can I fix my issues?
prxmatch, not perl. - Joe