The only error handling is associated with the two SQL statements. Any non-zero SQL code will result in the formatted SQLCA being written to VIDDMPD in batch and VIDDMP in CICS®. The error messages from the DISPLAY statements will go to the DD SYSOUT in batch and VIDPIPI in CICS. EXRET is set to E if an invalid SQL code is encountered and this causes a U3107 abend.