Informix Error -4367: Interrupt has already been deferred once in the main program. Each main program may defer interrupts only once.
Cause and resolution
Interrupt has already been deferred once in the main program. Each main program may defer interrupts only once.
The statements DEFER INTERRUPT and DEFER QUIT can only appear in the MAIN section of the program. They can appear only once each in a program.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4367 fires when DEFER INTERRUPT appears more than once in the MAIN program — per the
official guidance, DEFER INTERRUPT/DEFER QUIT can only appear in MAIN, and each only
once per program.
DEFER INTERRUPTused more than once inMAIN, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the duplicate
DEFER INTERRUPTstatement.
Examples
A duplicate DEFER INTERRUPT
MAIN
DEFER INTERRUPT
...
DEFER INTERRUPT
-- -4367: already deferred above
END MAIN
Corrected
MAIN
DEFER INTERRUPT
...
END MAIN
Diagnostic Checks
- Check
MAINfor more than oneDEFER INTERRUPTstatement, and remove the duplicate.
Related Errors / Related Topics
- -4365 — "Deferments of interrupt or quit may be executed only in the main program." A related restriction, about location rather than duplicate use.
- -4368 — "Quit has already been deferred once in the main program. Each main program may
defer quit only once." The equivalent restriction applied to
DEFER QUITinstead ofDEFER INTERRUPT.
DEFER INTERRUPT is used more than once in MAIN — remove the duplicate.