Compiling or assembling your program with the proper compiler options
Each programming language has a comprehensive set of compiler options. It is important to use the correct compiler options to prepare your program for debugging. The following list describes the simplest set of compiler options to use for each programming language:
- Compiler options that you can use with C programs
- The
TEST
andDEBUG
compiler options provide suboptions to refine debugging capabilities. Which compiler option and suboptions to choose depends on the version of the C compiler that you are using. - Compiler options that you can use with C++ programs
- The
TEST
andDEBUG
compiler options provide suboptions to refine debugging capabilities. Which compiler option and suboptions to choose depends on the version of the C++ compiler that you are using. - Compiler options that you can use with COBOL programs
- The
TEST
compiler option provides suboptions to refine debugging capabilities. Some suboptions are used only with a specific version of COBOL. This chapter assumes the use of suboptions available to all versions of COBOL. - Compiler options that you can use with LangX COBOL programs
- When you compile your OS/VS COBOL program, the following options
are required: NOTEST, SOURCE, DMAP, PMAP, VERB, XREF, NOLST, NOBATCH,
NOSYMDMP, NOCOUNT.
When you compile your VS COBOL II program, the following options are required: NOOPTIMIZE, NOTEST, SOURCE, MAP, XREF, and LIST (or OFFSET).
When you compile your Enterprise COBOL for z/OS® V3 and V4 program, the following options are required: NOOPTIMIZE, NOTEST, SOURCE, MAP, XREF, and LIST.
- Compiler options that you can use with PL/I programs
- The
TEST
compiler option provides suboptions to refine debugging capabilities. Some suboptions are used only with a specific version of PL/I. This chapter assumes the use of suboptions available to all versions of PL/I, except for PL/I for MVS or OS PL/I compilers, which must also specify theSOURCE
suboption. - Assembler options that you can use with assembler programs
- When you assemble your program, you must specify the ADATA option. Specifying this option generates a SYSADATA file, which the EQALANGX postprocessor needs to create a debug file.
See Planning your debug session for instructions on how to choose the correct combination of compiler options and suboptions to use for your situation.