Informix Error -1340: The error log has not been started.
Cause and resolution
The error log has not been started.
The program called the errorlog() function without first calling the startlog() function. Review the program logic to find out the cause of this error.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1340 fires when a program calls errorlog() without first calling startlog() — per the
official guidance, these two functions have a required ordering.
errorlog()called beforestartlog(), per the official guidance — the direct, only cause.
Solutions / Resolution
- Review the program logic to identify why this sequence violation happened, per the
official guidance, and call
startlog()before anyerrorlog()call.
Examples
errorlog() without startlog()
CALL errorlog("something went wrong")
-- -1340: startlog() was never called
Corrected
CALL startlog("myprogram.err")
CALL errorlog("something went wrong")
Diagnostic Checks
- Trace the program's execution path to confirm whether
startlog()executes before the failingerrorlog()call.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -1340 in this set yet.
errorlog() was called before startlog() — call startlog() first.