I got this coding exercise to extract certain length of characters from a given data set: Data Example; Input abc $12.; Datalines; 083154564684 783480645621 384563604852 ; Run; The task is to extract the # from 2nd to 6th digits. So I put num = SUBSTR(abc,2,5);. But instead it returned an extraction from 1st to 5th digits, aka "08315, 78348, 38456". Why is it??? Then I looked into this Example data set and found out all the last digits of those numbers were missing... I'm confused now and not sure if the above problem is somewhat related to it. (BTW I'm a beginner and I use the SAS University Edition for Windows.)
... View more