Your post content (the IF statement) and the SAS-generated diagnostic message are inconsistent (different SAS variable names used).
Suggest that you will get the most effective feedback by posting a reply with the exact SAS log (COPY/PASTE) with your code revealed in total and also the SAS NOTE, WARNING and ERROR messages, as they are generated.
Anything less creates a guessing-game, however I would tend to believe what SAS diagnostic information is being generated, to start - so, have a look at the SAS log, your code, and the specific SAS variables, by name -- remembering a SAS variable type defaults to NUMERIC, not CHARACTER, just in case there might be a misspelling.
Scott Barry
SBBWorks, Inc.