How do I resolve "Error writing file: too many constants" error?


This error means that too many Java constants were created and the program cannot be compiled.
It is usually returned when compiling very huge source files.

To avoid the error, add the -big option to the Compiler options, but only for the programs that return this error.
Other programs might experience performance slowdown if they are unnecessarily compiled with the -big option.

The best way to set this option so it's only used on the programs that need it is to add the option to the top of the program using the ">>IMP OPTION" directive, like this:

   >>IMP OPTION "-big"
  IDENTIFICATION DIVISION.
  PROGRAM-ID. HugeProgram.



Article ID: 216
Created: November 18, 2013
Last Updated: March 27, 2024
Author: Support KB Author

Online URL: https://support.veryant.com/phpkb/article.php?id=216