Hi Criculet,
From a DB2 point of view, the following example might help:
EXEC SQL
SELECT COALESCE(COL1, COL2)
INTO :H-VARS :H-VARS-NI
END-EXEC
IF H-VARS-NI = -1
do whatever you want to do when null is found....
ELSE
MOVE H-VARS TO W-VARS
END-IF
Hope this is clear, if not, get back to us.
Regards,
Marc