Debugging using compiler options

You can use certain compiler options to help you find errors in your program, find various elements in your program, obtain listings, and prepare your program for debugging.

About this task

You can find the following errors by using compiler options (the options are shown in parentheses):

  • Syntax errors such as duplicate data-names (NOCOMPILE)
  • Missing sections (SEQUENCE)
  • Invalid subscript values (SSRANGE)

You can find the following elements in your program by using compiler options:

  • Error messages and locations of the associated errors (FLAG)
  • Program entity definitions and references (XREF)
  • Data items in the DATA DIVISION (MAP)
  • Verb references (VBREF)

You can get a copy of your source (SOURCE) or a listing of generated code (LIST).

You prepare your program for debugging by using the TEST compiler option.

related references  
Compiler options