06-26-2013 12:00 PM
This attribute, hist12, contains a 12-month history of delinquency. For example, 100000001000 indicates the most recent month and 9 months prior have delinquencies and all other months were current. I need to identify accounts with at least 1 delinquency in the last 12 months. What's the most efficient way to code it? I can use substr function to extract one byte at a time, but I would think there are better ways.
06-26-2013 12:27 PM
Thanks. That really helps. One thing I forgot to mention is that there is a value 'Z' represents inactivity. So it could look like: 10000zz00100. Your codes would include accounts with at least one delinquency in last 12 months or at least one inactivity ('Z') in last 12 months. How do I code it so I only have the first set?
06-26-2013 12:39 PM
compress out the Z's....
Test is just to see the variable, you can delete that line.
test=input(compress(hist12, "z"), 12.);
if input(compress(hist12, "z"), 12.)>0 then flag=1;