Causes the Compiler to optimize any numeric data item to a native managed type (typically a 32-bit or 64-bit integer) when it determines that it is safe to do so.
Restriction: This directive is supported for JVM COBOL only.

It is not safe to optimize, and therefore no optimization is made, when the data item:

  • Is defined as subsidiary to some group item, and that group item is explicitly referenced somewhere in the program.
  • Redefines another item or is itself redefined.
  • Is accessed somewhere in the program using reference modification syntax.
  • Is passed BY REFERENCE to another program.
  • Is moved to or from a group item.




Phase: Syntax check
$SET: Initial


Whether or not ILOPTIMIZEDATA is specified, level-01 numeric items with a usage and picture that is equivalent to a native managed type (for example, 4 or 8 byte comp-5 data), and which are not redefined, will be treated as that native managed type. This may apply even if the item is passed by reference to another program, but this depends on the setting of the ILNATIVE directive.