A CA IDEAL program is run in batch and encounters a database error, for example, an RC 05 (34) but it still completes with a return code of 0.
IDADRUNP01I: Run Completed, RC=0
Release : 15.1
Component : CA IDEAL
This can be caused by coding an error procedure and not setting the return code in $RC.
If an error procedure is coded, it must set the $RC before exiting and before a LIST ERROR command.
For example, the default error procedure is coded like this:
IF $RC LT 12
SET $RC EQ 12
See CA Ideal documentation section Error Handling