I may be expecting too much from SAS on this, but here's the quandary. I need to have a program that reads instream data, which happens to be strings of characters mixed with numerical values, that also extracts pairs and individual items from the string --- consecutively --- and assigns what it extracts to new variables. So, for instance, it pulls the first 2 digits and assigns them to a; the 3rd digit is assigned to b; the 4th & 5th are characters assigned to c.... this part is easy - I got this one. a = input(substr(string,1,2),3.); b = input(substr(string,3,1),3.); c = UPCASE(substr(string,4,2)); This is what's stumping me: I'm using an array and do loop to process the 6th through 10th digits into 5 new variables. Here is the line of code that I'm working on to do this part: array n[5]; do i = 1 to 5; n = input(substr(string,6,1),3.); *I think I need some more instructions in this spot* end; So I have the input line there and the pointer starts at positing 6 and pulls only 1 digit -- all that is working -- but my output is wrong because it's populating that 6th digit to all 5 of the new variables. Obviously this is what I expect to happen right now because I don't know how to tell it to move its pointer to the next digit, process again, then move to the next, and then the next, and so on until it reaches the last digit of the string. Is this possible? Thank you.
... View more