Changing which file appears in the Source window
This topic describes several different ways of changing which file appears in the Source window. This topic assumes you already know the name of the source, listing, or separate debug file that you want to display. If you don't know the name of the file, see Displaying a list of compile units known to z/OS Debugger for suggestions on how to find the name of a file.
Before you change the file that appears in the Source window, make sure you understand how z/OS® Debugger locates source, listing, and separate debug files by reading How does z/OS Debugger locate source, listing, or separate debug files?.
To change which file appears in the Source window, choose one of the following options:
- Type over the name after
SOURCE:
, which is in the Header area of the Source window, with the desired name. The new name must be the name of a compile unit that is known to z/OS Debugger. - Use the Source Identification panel to direct z/OS Debugger to the
new files:
- With the cursor on the command line, press PF4 (
LIST
).In the Source Identification panel, you can associate the source, listing, or separate debug file that show in the Source window with their compile unit.
- Type over the Listing⁄Source File field with the new name.
- With the cursor on the command line, press PF4 (
- Use the
SET SOURCE
command. With the cursor on the command line, typeSET SOURCE ON (cuname) new_file_name
, where new_file_name is the new source file. Press Enter.If you need to do this repeatedly, you can use the
SET SOURCE ON
commands generated in the Log window. You can save these commands in a file and reissue them with theUSE
command for future invocations of z/OS Debugger. - Enter the
PANEL PROFILE
command, which displays the Profile Settings panel. Enter the new file name in the Default Listing PDS name field. - Use the
SET DEFAULT LISTINGS
command. With the cursor on the command line, typeSET DEFAULT LISTINGS new_file_name
, where new_file_name is the renamed listing or separate debug file. Press Enter.To point z/OS Debugger to several renamed files, you can use the
SET DEFAULT LISTINGS
command and specify the renamed files, separated by commas and enclosed in parenthesis. For example, to point z/OS Debugger to the filesSVTRSAMP.TS99992.MYPROG
,PGRSAMP.LLTEST.PROGA
, andRRSAMP.CRTEST.PROGR
, enter the following command:SET DEFAULT LISTINGS (SVTRSAMP.TS99992.MYPROG, PGRSAMP.LLTEST.PROGA, RRSAMP.CRTEST.PROGR) ;
- Use the EQADEBUG DD statement to define the location of the files.
- Code the EQAUEDAT user exit with the location of the files.
For C and C++ programs compiled with the FORMAT(DWARF)
and FILE
suboptions
of the DEBUG
compiler option, the information in
this topic describes how to specify the location of the source file. If you or your site specified YES for the EQAOPTS MDBG
command
(which requires z/OS Debugger to search
for the .dbg and the source file in a .mdbg file)1,
you cannot specify another location for the source file.
MDBG
command.