First, suggest you use a WHERE instead of IF, for possible performance gain. Also, you may consider using a SAS VIEW as well.
Then, review your use of OR vs AND after your first test. And so with what you have explained, you will need to surround the remaining tests with parentheses, so that the first test is for not-in-your-list *AND* is-in-your-list (for the remaining SAS variables).
And, consider using a SAS macro variable (using a %LET statement) to list the value-string that you want to test, presuming they are all the same variable values.
Scott Barry
SBBWorks, Inc.
Message was edited by: sbb