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
orBASIS
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 tasks
Finding coding errors
Finding line sequence problems
Checking for valid ranges
Selecting the level of error to be diagnosed
Finding program entity definitions and references
Listing data items
Getting listings
Finding coding errors
Finding line sequence problems
Checking for valid ranges
Selecting the level of error to be diagnosed
Finding program entity definitions and references
Listing data items
Getting listings