Monitoring database file errors in a program
When your applications perform operations on database files, monitor messages about file errors so as to take appropriate actions to prevent the errors.
Each high-level language (HLL) provides its own procedure for monitoring these messages, and you should see the documentation for the HLL you are using to implement error message monitoring. One or more of the following events occur when error conditions are detected during processing of a database file:
For example, the COBOL language sets a return code in the file status field if it is defined in the program.
- Messages can be sent to the program message queue for the program processing the file.
- An inquiry message can be sent to the system operator message queue.
- File errors and diagnostic information can appear to your program as return codes and status information in the file feedback area.
- System handling of error messages
If you do not monitor messages about database file errors, the system handles the errors.
- Effect of error messages on file positioning
If a message is sent to your program when your program is processing a database file member, the position in the file is not lost.
- Determining which messages you want to monitor
If your programming language allows you to monitor error messages, you can choose which messages you want to monitor.
Parent topic:
Processing database files