Suggest bookmarking this page as a favorite for reference - useful reminder for posting special data-strings:
http://support.sas.com/forums/thread.jspa?messageID=27609
Also, with arrays, you can use straight left/right parenthesis characters. Similar to how you can use !! instead of || (two vertical bars) for concatenation.
Are you doing a CALL SYMPUT or a CALL EXECUTE? How does the code get executed after generating the macro variable?
Lastly, I'll ask the question: What are you looking from the forum to get back with this latest shared information? BETWEEN doesn't work with IF....that's a given, but it seems as though you are unwilling to code your look-up table such that the IF statement "expression" string (when coded in parentheses as I demonstrated) must have either a single value to compare (EQ, LT, GE, etc.) or a value-range which must then be split into two components the part that goes left of the "varname" and the other component that is to the right.
Seems pretty clear to me - the look-up table must be altered to accommodate the IF/THEN logic when you have a value-range to use (which would have been used with a BETWEEN, had this been a WHERE statement/clause).
Scott
Message was edited by: sbb