Cancels a source directory search list, a source directory search
method, or both a list and method established by a previous SET
SOURCE command.
Format
CANCEL SOURCE
1 – Qualifiers
1.1 /DISPLAY
Cancels the effect of a previous SET SOURCE/DISPLAY command,
which specifies the directory search list to be used by the
debugger when displaying source code. Canceling this command
means the debugger searches for a source file in the directory in
which it was compiled.
1.2 /EDIT
Cancels the effect of a previous SET SOURCE/EDIT command, which
specifies the directory search list to be used during execution
of the debugger's EDIT command. Canceling this command means the
debugger searches for a source file in the directory in which it
was compiled.
1.3 /EXACT
Cancels the effect of a previous SET SOURCE/EXACT command, which
specifies a directory search method. Canceling this command means
that the debugger no longer searches for the exact version of the
source file from compilation; it reverts to the default behavior
of searching for the latest version of the file.
1.4 /LATEST
Cancels the effect of a previous SET SOURCE/LATEST command, which
specifies a directory search method. In this case, the CANCEL
SOURCE/LATEST command directs the debugger to return to searching
for the exact version of the source file from compilation.
Because /LATEST is the default setting, this qualifier only makes
sense when used with other qualifiers, for example, /MODULE.
1.5 /MODULE
/MODULE=module-name
Cancels the effect of a previous SET SOURCE/MODULE=module-
name command in which the same module name and qualifiers were
specified. (The /MODULE qualifier allows you to specify a unique
directory search list, directory search method, or both, for
the named module.) You can append one or more of the qualifiers
listed above to the SET SOURCE/MODULE and CANCEL SOURCE/MODULE
commands.
If you issue a CANCEL SOURCE/MODULE command with additional
qualifiers, you cancel the effect of the specified qualifiers
on the module. If you issue an unqualified CANCEL SOURCE/MODULE
command, the debugger no longer differentiates the module from
any other module in your directories.
1.6 /ORIGINAL
(Applies to STDL programs only. Requires the installation of the
Correlation Facility (a separate layered product) and invocation
of the kept debugger.) Cancels the effect of a previous SET
SOURCE/ORIGINAL command. The SET SOURCE/ORIGINAL command is
required to debug STDL source files, and must be canceled when
you debug source files written in other languages.
2 – Description
CANCEL SOURCE cancels the effect of a previous SET SOURCE
command. The nature of this cancellation depends on the
qualifiers activated in previous SET SOURCE commands. See the
CANCEL SOURCE examples to see how CANCEL SOURCE and SET SOURCE
interact.
When you issue a SET SOURCE command, be aware that one of the
two qualifiers -/LATEST or /EXACT-will always be active. These
qualifiers affect the debugger search method. The /LATEST
qualifier directs the debugger to search for the version last
created (the highest-numbered version in your directory). The
/EXACT qualifier directs the debugger to search for the version
last compiled (the version recorded in the debugger symbol table
created at compile time). For example, a SET SOURCE/LATEST
command might search for SORT.FOR;3 while a SET SOURCE/EXACT
command might search for SORT.FOR;1.
CANCEL SOURCE without the /DISPLAY or /EDIT qualifier cancels the
effect of both SET SOURCE/DISPLAY and SET SOURCE/EDIT, if both
were previously given.
The /DISPLAY qualifier is needed when the files to be displayed
are no longer in the compilation directory.
The /EDIT qualifier is needed when the files used for the display
of source code are different from the editable files. This is the
case with Ada programs. For Ada programs, the (SET,SHOW,CANCEL)
SOURCE commands affect the search of files used for source
display (the "copied" source files in Ada program libraries);
the (SET,SHOW,CANCEL) SOURCE/EDIT commands affect the search of
the source files that you edit when using the EDIT command.
For information specific to Ada programs, see the
Language_Support Ada help topic.
Related commands:
(SET,SHOW) SOURCE
3 – Examples
1.DBG> SET SOURCE/MODULE=CTEST/EXACT [],SYSTEM::DEVICE:[PROJD]
DBG> SET SOURCE [PROJA],[PROJB],[PETER.PROJC]
. . .
DBG> SHOW SOURCE
source directory search list for CTEST,
match the exact source file version:
[]
SYSTEM::DEVICE:[PROJD]
source directory list for all other modules,
match the latest source file version:
[PROJA]
[PROJB]
[PETER.PROJC]
DBG> CANCEL SOURCE
DBG> SHOW SOURCE
source directory search list for CTEST,
match the exact source file version:
[]
SYSTEM::DEVICE:[PROJD]
all other source files will try to match
the latest source file version
In this example, the SET SOURCE command establishes a directory
search list and a search method (the default, latest version)
for source files other than CTEST. The CANCEL SOURCE command
cancels the directory search list but does not cancel the
search method.
2.DBG> SET SOURCE /EXACT
DBG> SHOW SOURCE
no directory search list in effect,
match the exact source file
DBG> SET SOURCE [JONES]
DBG> SHOW SOURCE
source directory list for all modules,
match the exact source file version:
[JONES]
DBG> CANCEL SOURCE /EXACT
DBG> SHOW SOURCE
source directory list for all modules,
match the latest source file version:
[JONES]
In this example, the SET SOURCE/EXACT command establishes a
search method (exact version) that remains in effect for the
SET SOURCE [JONES] command. The CANCEL SOURCE/EXACT command not
only cancels the SET SOURCE/EXACT command, but also affects the
SET SOURCE [JONES] command.