i have done something like this, but I'm testing for more then one row in thes case.
DEFINE l_sql_err INTEGER;
DEFINE l_isam_err INTEGER;
DEFINE l_err_txt CHAR(60);
FOREACH
SELECT field
INTO scratch
FROM tabname
WHERE .........................
ON EXCEPTION
SET l_sql_err, l_isam_err, l_err_txt
IF l_sql_err = -284
THEN
-- Do Nothing
END IF
END EXCEPTION
-- rest of your own code here
END FOREACH
Hope this helps
Cheers