Thanks again Tom for your response. I agree with you that there are better ways to do this. Basically, what I have been trying to do is a table look-up and there are many ways in SAS (like SQL (your way), proc format, data step merge, hashes, etc etc). I like to program in R primarily where like SAS there are many ways to do a table look-up (R uses vectors and it also allows you to use 'for' loops). However there are times when you can't use vectors...think of a task that requires you to retain variables, is recursive, has fuzzy logic...although rare, these situations require that you think from a bottom up . SAS however has implicit looping by the very nature of the data step. Why not take advantage of the fact that observations are read one at a time and then you can use macros to act on the PDV and then . All of this is the SAS way after all...I don't think any other language prides itself in being able to do things many ways! Its actually not complicated at all. I think its easier than a Data Step merge where you have conditional statements. Okay I am rambling! Thanks!
... View more