Informix Error -4368: Quit has already been deferred once in the main program. Each main program may defer quit only once.
Cause and resolution
Quit has already been deferred once in the main program. Each main program may defer quit 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
-4368 fires when DEFER QUIT 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 QUITused more than once inMAIN, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the duplicate
DEFER QUITstatement.
Examples
A duplicate DEFER QUIT
MAIN
DEFER QUIT
...
DEFER QUIT
-- -4368: already deferred above
END MAIN
Corrected
MAIN
DEFER QUIT
...
END MAIN
Diagnostic Checks
- Check
MAINfor more than oneDEFER QUITstatement, 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.
- -4367 — "Interrupt has already been deferred once in the main program. Each main
program may defer interrupts only once." The equivalent restriction applied to
DEFER INTERRUPTinstead ofDEFER QUIT.
DEFER QUIT is used more than once in MAIN — remove the duplicate.