You can suppress the unspecified indicator variable error by setting the UNSAFENULL YES option in the PRECOMPILE command, when you set the precompiler option COMPATIBILITY_MODE to ORA.
# Suppress SQL0305N error.
db2 prep test.sqc COMPATIBILITY_MODE ORA UNSAFENULL YES
# Default behavior if null value is retrieved, SQL0305N error
db2 prep test.sqc COMPATIBILITY_MODE ORA UNSAFENULL NO
db2 prep test.sqc COMPATIBILITY_MODE ORA
db2 prep test.sqc
# Below both PRECOMPILE option give error as COMPATIBILITY_MODE ORA is not set.
db2 prep test.sqc UNSAFENULL YES
db2 prep test.sqc UNSAFENULL NO