I'm using the (Windows NT) SAS pass-through to get data from DB2 on an
MVS system. For the 'where' clause part of the SQL I'm wanting to
restrict it to values of the column/variable 'Stat2' that are blank.
By 'blank' I mean rows where the value of Stat2 is a single space
If I try using the following 'where' clause to achieve this it doesn't
seem to work - i.e. the syntax seems to be correct but the blank
character on the DB2 table is not recognised as the same as the blank
character I type in on my PC.
Where Stat2 = ' '
Is this something to do with me needing to use the EBCDIC version of a
blank space as opposed to the ASCII version ? If so how would I
actually do this.
I've included the code I'm currently using below to get around this
problem. I could keep using this code but I think there maybe a better
way of doing it.
Any help would be greatly appreciated.
Proc Sql ;
Connect To DB2(SSID=Whatever);
From Connection To DB2
Where Stat2 Not In ( 'C', 'S', 'R', 'X', 'Z' )
Disconnect From DB2;