PURPOSE: The ERROR MESSAGES option controls the displaying of fatal error messages during program processing. This command is valid in a CM, PM, SF or as a direct command.
{ENABLE; DISABLE} ERROR MESSAGES [{IF; UNLESS} clause]
ENABLE |
allows the displaying of error messages during program processing. This is the default state. |
DISABLE |
suppresses the displaying of error messages during program execution. |
{IF; UNLESS} clause |
specifies certain criteria that must be met for the ENABLE or DISABLE command to take effect. |
In the example below, no error messages would appear.
*LIST CM PAY
00001 DISABLE ERROR MESSAGES, ERROR ABORT
00002 SET 0 TO @ERROR_NUMBER
00003 USE DS PAY
00004 IF @ERROR_NUMBER #0
00005 TYPE "CANNOT PROCESS PAYROLL FILE."
00006 TYPE "NOTIFY SYSTEM MANAGER AT ONCE."
00007 EXIT
00008 CONTINUE
*USE CM PAY
CANNOT PROCESS PAYROLL FILE.
NOTIFY SYSTEM MANAGER AT ONCE.
NOTES: This allows you to suppress errors and display your own message.