CA Ideal Batch IDADRUNP01I: Run Completed, RC=0 after database error

book

Article ID: 197762

calendar_today

Updated On:

Products

CA Ideal

Issue/Introduction

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 

 

Cause

This can be caused by coding an error procedure and not setting the return code in $RC.

Environment

Release : 15.1

Component : CA IDEAL

Resolution

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

 

Additional Information

See CA Ideal documentation section Error Handling