This section describes:
Additional return codes as well as other peculiarities, which only apply to individual batch utilities, can be found in the section in which the specific batch utility is described.
The following standard return codes apply to all batch utilities:
Symbolic name |
RC |
Description |
---|---|---|
BAT_ERR_NODATA |
4 |
No data for processing |
BAT_ERR_ERRLIMIT |
8 |
Error limit reached |
BAT_ERR_DDMISSING |
20 |
DD statement missing |
BAT_ERR_QSAMOPEN |
20 |
Dataset open error |
BAT_ERR_BQLOPEN |
20 |
Error during database access initialization |
BAT_ERR_BQLEXEC |
20 |
Database access error |
BAT_ERR_SYNTAX |
20 |
Syntax error |
BQL_ERR_WQERC |
24 |
Communication error |
BAT_ERR_SECURITY |
32 |
SIGNON=NO and/or ADM required |
BQL_ERR_ABEND |
32 |
BQL abend |
BQL_ERR_COMMAND |
36 |
BQL command error |
You can control the behavior of the batch utilities regarding a part of the standard return codes with the help of the following LST parameters:
Parameter |
Description |
---|---|
B97_BAT_ERR_DDMISSING |
Sets the return code of the respective error to the specified value Valid values: 0..4095 Note: The following standard return codes cannot be changed:
|
B97_BAT_RET_MAXCC |
Sets the program return code to the specified value (works like SET MAXCC) Valid values: 0..4095 |
B97_BAT_RET_OKAY |
Sets the program return code of non-error to the specified value: Valid values: 0..4095 |
B97_TRACE_BAT_RC |
YES causes the logging of the current values of all modifiable return codes in the IRMLOG Valid values: YES | NO |
You can control the return code behavior globally by entering the LST parameter in the B97LSTxx member of the system.
Or you can control the return code behavior of individual jobs by entering the LST parameter in the EXEC statement of the JCL, for example:
+-----------------------------------------------------------------+
|//B97DELOG EXEC PGM=BST01RFF,REGION=0M,PARM=('S=97', |
|// 'PGM=B97DELOG', |
|// 'B97_BAT_ERR_NODATA=0', |
|// 'SIGNON=YES') |
+-----------------------------------------------------------------+
If the LST parameter B97_TRACE_BAT_RC = YES is coded, the values of the standard return codes including your modified return codes are written to DD IRMLOG:
+----------------------------------------------------------------------------------------------+
|IRM1561I PROGRAM: B97DELOG VERSION: V7R2M00 PTFLVL: level COMPILED: date, time |
|IRM2100I LOG-MSG CLEANUP PROCESSING STARTED - DATE: date TIME: time |
|IRM2210I *************************************************************************************|
|IRM2210I DFLT_BAT_ERR_DDMISSING = 20 |
|IRM2210I DFLT_BAT_ERR_QSAMOPEN = 20 |
|IRM2210I DFLT_BAT_ERR_BQLOPEN = 20 |
|IRM2210I DFLT_BAT_ERR_BQLEXEC = 20 |
|IRM2210I DFLT_BAT_ERR_SYNTAX = 20 |
|IRM2210I DFLT_BAT_ERR_NODATA = 4 |
|IRM2210I DFLT_BAT_ERR_SECURITY = 32 |
|IRM2210I DFLT_BAT_ERR_ERRLIMIT = 8 |
|IRM2210I DFLT_BAT_RET_OKAY = 0 |
|IRM2210I -------------------------------------------------------------------------------------|
|IRM2210I B97_BAT_ERR_NODATA = 0 |
|IRM2210I -------------------------------------------------------------------------------------|
|... |
+----------------------------------------------------------------------------------------------+
In the above example, the program will terminate with RC=0 if it does not find any data for processing (instead of with RC=4).