The IFN function returns incorrect results in SASĀ® 9.4M4 (TS1M4)


When you use the IFN function in queries similar to the one below in SAS 9.4M4, an incorrect value is returned:

proc sql;
create table test2 as
elect totsales,output_from_datastep,IFN(totsales IN (.,0) | totsales > 100 | totsales < 1 ,1,0)
as output_from_procsql from test1;
quit;

This problem is specific to this version of SAS and to Linux operating systems.

To circumvent the issue, upgrade to a newer version of SAS such as SAS 9.4M5 (TS1M5) or later.