With Enterprise COBOL for z/OS V5, the new STGOPT option can be used to control storage optimization.
This option syntax is as follows:
NOSTGOPT is the default option. SO is the abbreviation for STGOPT and NOSO is for NOSTGOPT.
If STGOPT is specified, the compiler will discard any or all of the following data items, and will not allocate storage for them.
Unreferenced LOCAL-STORAGE and non-external WORKING-STORAGE level-77 and level-01 elementary data items
Non-external level-01 group items if none of their subordinate items are referenced
Unreferenced special registers
The compiler will not generate code to initialize these data items to the values in their VALUE clauses.
In addition, with STGOPT, data items in the LOCAL-STORAGE SECTION can be reordered in memory to optimize performance.