IMIF should only use result variables or global variables.
Instead of the following approach
select monthr=12 select yearr=2008 select i1="Y" imif (monthr=12) and (yearr=2008) and (i1="Y") then tables C2bsex i1 else type "No case reported with this Opportunistic infection" endif
Try this:
select monthr=12 select yearr=2008 select i1="Y" * count the records that match the select criteria count /q * $count is the result of the count function; is it > 0 imif $count > 0 then tables c2bsex i1 else type "No case reported with this Opportunistic infection" endif
Jamie
Dr. Shavinder wrote:
Dear All, I am finding a problem while using IMIF command to tabulate the Opportunistic infections of the database “aids.rec”. The PGM being used is AIDSP which is meant to tabulate the Opportunistic infections. When I run the PGM there is no tabulation of the Opportunistic infections. However “select” and “freq” commands do display the Opportunistic infections in the database.
I was using IMIF command because the PGM was getting stuck where there were no Opportunistic infections data in the record.