An Ideal user program is run in batch via IDBATCH . It 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
z/OS
Ideal 15.1
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:
<<ERROR>> PROCEDURE
IF $RC LT 12
SET $RC EQ 12
ENDIF
LIST ERROR
BACKOUT
QUIT RUN
ENDPROC
See Ideal documentation section Error Handling.