Batch Processor ends with RC=04

Document ID : KB000011845
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

Execution of (for example) a RC/Migrator script ends after unload of some tables with these messages.

UNLD002I *** ROWS UNLOADED = 27,521, LIMIT = ALL                 
UNLD004I *** UNLOAD EXECUTION COMPLETE, TIME: 10:29:01           

RETCODE =     4                                                   

CONTROL PROCESS CARD:                                             
BATCH PROCESSOR PLAN ===> RBPAPLAN                                 
BATCH PROCESSOR ID   ===> DB2ADM.RCM.STRAT-MOVEDB          
STRATEGY NAME        ===> DB2ADM.MOVEDB                        
DEVICE ALLOCATION UNIT => SYSDA                                   

 BPA0144I: FINAL LOG RECORD WRITTEN FOR SUBSYSTEM ===> DSN0.      

 BPA0144I: FINAL LOG RECORD WRITTEN FOR SUBSYSTEM ===> DSN1.      

*****  RESTART POINT ESTABLISHED AT SYNC VALUE        15  *****   

 
*****  BATCH PROCESSOR INCOMPLETE WITH WARNINGS  *****             

What is wrong? And how to continue.

      

  

 

Answer:

Note the last line in above message: BATCH PROCESSOR INCOMPLETE WITH WARNINGS

Scrolling up reveals the warning, for example: UNLD061W *** TRUNCATION/DISCARD MAY OCCUR FOR COLUMN MODIFICATION_TYPE   

Now look for the .OPTION in the top of the output or the JCL

 .OPTION NOERRORS NOSQLERRORS RETRY(05) NOBINDERRORS

NOERRORS cause the batch processor to stop whenever a non-zero return code is returned.

 

Change this option to ERRORS and the job will continue despite warnings.

Additional Information:

Here is a description from the ‘Batch Processor Reference Guide’ Commands, Options:

ERRORS|NOERRORS

Determines whether processing ends when errors are encountered. ERRORS at the start of an input data set, causes Batch Processor to continue processing if a return code of 4 or less is encountered from a process that is not covered by the DISCARDS|NODISCARDS or BINDERRORS|NOBINDERRORS parameters.

NOERRORS at the start of an input data set, causes Batch Processor to end whenever a non-zero return code is encountered from a process that is not covered by the DISCARDS|NODISCARDS or BINDERRORS|NOBINDERRORS parameters. NOERRORS is the default.

 

Note: These parameters have no control over the processing from BIND return codes.

 

R18 .OPTION Command -- Define Error Processing Options

R19 .OPTION Command -- Define Error Processing Options

 

If you use the online panel to submit the job, this option is set with field CONTINUE IF: / WARNING

CONTINUE IF: 
-WARNING           ===> Y 
-SQL ERROR         ===> N 
-BIND ERROR       ===> N 
-LOAD DISCARDS ===> N