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.

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; text-names and library-names from COPY or BASIS statements, and the associated data sets or files from which copybooks are obtained (XREF)
  • Data items in the DATA DIVISION (MAP)
  • Statement 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