Batch Condition Codes and User Exit Routines

#### Search Results

Search

# Batch Condition Codes and User Exit Routines

This section describes the condition codes returned for Object Handler functions in batch mode and the user exit routines available for function processing.

- Condition Codes Returned in Batch

- Applying User Exit Routines

- User Exit Routines Available

## Condition Codes Returned in Batch

Object Handler processing in batch mode terminates with one of the following condition codes:

Condition Code | Explanation
--- | ---
0 | Object Handler process terminated successfully.
30 | An internal Object Handler error occurred.
40 | An error was detected in the Object Handler command.
50 | An error occurred during Object Handler processing.
60 | A Natural Security error occurred during Object Handler processing.
99 | A Natural error occurred during Object Handler processing.

## Applying User Exit Routines

The Object Handler user exit routines are supplied as source objects in the Natural system library SYSOBJH. These source objects are named SRC-EXnn, where nn denotes the number of the user exit routine.

To activate a user exit routine

- `CATALOG` or `STOW` source object SRC-EXnn under the name `OBJHEXnn` in the Natural system library SYSOBJH.

  Different names are used to guarantee that the source object (possibly modified according to your requirements) and the cataloged object of the user exit routine are not overwritten by an update installation.

  For detailed descriptions of the user exit routines, see the source objects of SRC-EXnn in the library SYSOBJH.

## User Exit Routines Available

The following user exit routines are available:

- OBJHEX01 for Processing Failures

- OBJHEX02 for Object Rejection

- OBJHEX03 for Default Option Values

- OBJHEX04 for Natural Object Type Statistics

### OBJHEX01 for Processing Failures

Whenever a condition code is set to a value greater than 0 (zero) in batch mode, the user exit routine OBJHEX01 (if available) will be invoked before the Object Handler stops processing. With this user exit routine, you can specify whether to continue or terminate Object Handler processing. In the case of termination, you can change the condition code. For further details, see the source of the user exit routine SRC-EX01 in the Natural system library SYSOBJH.

### OBJHEX02 for Object Rejection

If the Object Handler load function was executed successfully in batch mode (with Condition Code 0) or in online command mode, but one or more objects were rejected during loading (for example, not replaced), before the Object Handler stops processing, the user exit routine OBJHEX02 (if available) is invoked. With OBJHEX02, you can specify whether to continue or terminate Object Handler processing. In the case of termination, you can set a condition code. For further details, see the source of the user exit routine SRC-EX02 in the Natural system library SYSOBJH.

### OBJHEX03 for Default Option Values

You can apply user exit routine OBJHEX03 to set default options for processing Object Handler commands. This user exit is invoked before an Object Handler command is processed. For further details, see the source object of the user exit routine SRC-EX03 in the Natural system library SYSOBJH.

### OBJHEX04 for Natural Object Type Statistics

If the Object Handler unload, load or scan function was executed successfully in command mode, the user exit routine OBJHEX04 (if available) is invoked. It provides statistics for each Natural object type on the sources and catalogued objects processed, replaced, not replaced or rejected. With OBJHEX04, you can specify whether to continue or terminate the Object Handler processing in batch mode. In the case of termination, you can set a condition code. For further details, see the source of the user exit routine SRC-EX04 in the Natural system library SYSOBJH.

### On this page

- Condition Codes Returned in Batch
- Applying User Exit Routines
- User Exit Routines Available