Return codes

Overview

This section describes:

  • The standard return codes of the Adabas Audit Data Retrieval batch utilities
  • How you can control the return code behavior of the batch utilities with the help of the LST parameters

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.

Standard return codes

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
(normally: subsystem not available)

BAT_ERR_SECURITY

32

SIGNON=NO and/or ADM required

BQL_ERR_ABEND

32

BQL abend

BQL_ERR_COMMAND

36

BQL command error

Modifying standard return codes

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
B97_BAT_ERR_QSAMOPEN
B97_BAT_ERR_BQLOPEN
B97_BAT_ERR_BQLEXEC
B97_BAT_ERR_SYNTAX
B97_BAT_ERR_ERRLIMIT
B97_BAT_ERR_SECURITY
B97_BAT_ERR_NODATA

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:

  • BQL_ERR_WQERC
  • BQL_ERR_ABEND
  • BQL_ERR_COMMAND

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

Use

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') |
+-----------------------------------------------------------------+

Logging the values of standard return codes

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).