Removing statement and symbol tables
If you are concerned about the size of your program, you can remove
the symbol table, the statement table, or both, after the initial
testing period. For C and PL/I programs, compiling with the option TEST(NOSYM)
inhibits
the creation of symbol tables.
Before you remove them, however, you should consider their advantages. The statement table allows you to display the execution history with statement numbers rather than offsets, and error messages identify statement numbers that are in error. The symbol table enables you to refer to variables and program control constants by name. Therefore, you need to look at the trade-offs between the size of your program and the benefits of having symbol and statement tables.
For programs that are compiled with the following compilers and
with the SEPARATE
suboption of the TEST
compiler
option, the symbol tables are saved in a separate debug file.
This arrangement lets you to retain the symbol table information and
have a smaller program:
- Enterprise COBOL for z/OS®, Version 6 Release 2 and later
- Enterprise COBOL for z/OS, Version 4
- Enterprise COBOL for z/OS and OS/390®, Version 3
- COBOL for OS/390 & VM, Version 2 Release 2
- COBOL for OS/390 & VM, Version 2 Release 1, with APAR PQ40298
- Enterprise PL/I for z/OS, Version 3.5 or later
For C and C++ programs compiled with the C/C++ compiler of z/OS, Version 1.6 or later, you
can compile with the FORMAT(DWARF)
suboption of the DEBUG
compiler
option to save debug information in a separate debug file.
This produces a smaller program.
Programs compiled with the Enterprise COBOL for z/OS Version 5 compiler, Version 6 Release 1 compiler, or Version 6 Release 2
and later compiler with the TEST(NOSEPARATE)
compiler
option have all of their debug information (including the symbol table) stored in a
NOLOAD
segment of the program object. This segment is only loaded into memory when
you are debugging the program object.