Error Trapping

For Applications Manager to update statuses of tasks correctly, the exit values of processes must be trapped.

To update statuses of tasks correctly, Applications Manager must trap the exit values of the processes, and the program type script must exit with this value. This is accomplished by including the appropriate error trapping code in the program type script.

In addition to capturing the error code for a single process, you may want to capture cumulative errors for multiple processes, ensuring the script exits with an error code even if one process fails but the next process succeeds.

Some processes such as FTP and Oracle may have errors, but still exit with a zero exit value. With these types of processes, you may have to search for specific text strings in the log files to determine whether the process completed successfully.

The code you use to trap errors is different for UNIX and Windows. Each is described separately in the following subtopics.