Informix Error -16377
-16377 Cannot retrieve values of global variables before execution begins.
A PRINT command cannot display the value of a global program variable until after execution begins. Invoke the RUN or CALL command to begin execution and then repeat the PRINT command. In this situation, you can specify constants or the names of global variables as arguments of CALL. (You might have to set a breakpoint or press the Interrupt key to suspend the program before normal termination.)
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-16377 fires when PRINT targets a global variable before execution has begun — per the
official guidance.
PRINTon a global variable beforeRUN/CALLhas started execution, per the official guidance — the direct, only cause.
Solutions / Resolution
- Invoke
RUNorCALLto begin execution, then repeatPRINT, per the official guidance. - In this situation,
CALLarguments can use constants or global variable names, per the official guidance. - Set a breakpoint, or press Interrupt, to suspend the program before normal termination, per the official guidance, if needed to keep it running.
Examples
PRINT on a global variable before execution starts
> PRINT global_var
Corrected
> RUN
> BREAK mymodule.10
> CONTINUE
> PRINT global_var
Diagnostic Checks
- Check whether execution has started before using
PRINTon a global variable.
Related Errors / Related Topics
- -16373 — "Cannot print or make assignments before execution has started." The general
execution-state restriction this is a specific case of, for
PRINTon global variables.
PRINT targeted a global variable before execution started — start it with RUN/CALL
first.