AS/400 |
Use the Load Program dialog box to attach to an
existing job to debug or to load a program without specifying a job. The functionality of
this dialog box changes depending on whether you are attaching to a job or
loading a program without specifying a job.
You
can also define the initial debugger environment using invocation options found in this
dialog box.
Jobs on the AS/400 can be one of the following:
- Interactive jobs, which are enabled to run an application with
screen input/output.
- Batch jobs.
- Batch immediate (BCI) jobs, which are enabled to run a threaded
application. Applications with screen input/output should not be run in a
BCI job.
All types of jobs can be attached to by the debugger. When you load a
non-Java application without specifying a job, a BCI job is automatically
created on the AS/400. When you load a Java class without specifying a job, a Java Virtual
Machine (JVM) is created on the AS/400.
Depending on whether you are attaching to an existing AS/400 job or loading a
program without specifying a job, select the appropriate link:
Attach to an existing AS/400 job
When you are attaching to an existing AS/400 job, the behavior of the
debug session changes depending on whether or not you select Step Into in
this dialog box. For more details, see the description of the Step Into
box in this group.
Controls and control groups in
this group are used as follows:
Job to debug |
In this field, specify the name of the AS/400 job you want to
put under debug mode. A fully
qualified AS/400 job name has the format job/user/number, where:
- job is the name of the job as identified to the system, for example,
QPADEV0017.
- user is the user profile under which the job is running, for example,
MYUSER.
- number is the system-assigned job number, for example, 001234.
If the system-assigned job number is known, then specifying it in the format //number
will specify a unique job and specification of job and user will
not be necessary.
You can use one of the following methods to retrieve a subset list of the jobs
available on the AS/400 system. Entries are made in the Job to debug
field and the Job List
push button is clicked to invoke the Job List dialog box:
- Entering QPADEV0017// gives you a list of jobs with job name QPADEV0017.
- Entering /MYUSER/ gives you a list of jobs with user profile MYUSER.
- Entering //001234 gives you the job assigned this job number.
You can also specify an abbreviated job name. The following formats are supported:
*, *ALL, blank |
All occurrences are found. |
abc* |
All occurrences starting with the character string abc are
found. |
abc |
Only exact matches of the character string abc are found. |
The following examples illustrate how to use these formats. Entries are made in the
Job to debug field and the Job List push button is clicked to invoke the Job List dialog
box:
- Entering QPADEV0017/*ALL/ gives you a list of all the jobs in QPADEV0017.
- Entering // or leaving the Job to debug field blank gives you a list of all the jobs on the
system.
- Entering /G*/ gives you a list of all the jobs that are owned by user IDs that start
with a G.
- Entering G*/*/* gives you a list of all the jobs owned by anyone in a job that starts
with a G.
If a wild card indicates a user ID that owns a single job, then specifying the wild
card in this field will cause that job to be used. However, using wild cards to indicate
multiple jobs is useful only to filter the list of jobs when the Job
List push button is
selected. When you select the Load push button, exactly one job must be indicated or an
error dialog is displayed. |
Job List |
Click Job List to invoke the Job List dialog box.
From the jobs listed in this dialog box, select the job you are going to
debug. |
Specify the name of the program to add to debug |
When attaching to an existing job on an AS/400, specifying the
program name is optional but has the following conveniences:
- The program will be added as an entry to the Programs pane. If this dialog's Step Into box is also checked, the debugger will stop at
the first debuggable statement which runs in the job you specified.
- The debug session will terminate automatically when the program has run to completion.
If the program name is not specified, the debug session must be terminated manually.
You can enter the program name using one of the following formats:
- Library/program -- The debugger searches the specified library for the program. If
it does not find the
program in the specified library, an error message is displayed.
- *LIBL/program -- The debugger searches all of the libraries in the library list for the job specified in the Job
to debug entry field of the Load Program dialog box until it finds the first
match for the specified program name. If it does not find the program in the library
list, an error message is displayed.
- *CURLIB/program -- The debugger uses the current library for the job specified in the Job to
debug
entry field of the Load Program dialog box to locate the program. If you do not
have a library designed as the current library, it searches QGPL instead. If
it does not find the program, an error message is displayed.
- Program -- When only the program name is specified, the search path used is the same as
that used for *LIBL/program.
- Class name.
To locate a Java class that resides on IFS, you can map the IFS network drive to your
workstation, and click Browse to select the class on
the mapped network drive in
the Open dialog box.
|
Enter any program parameters |
Leave this field blank. Enter any desired parameters when you start your application.
|
Specify the language of the program to debug |
Select a language from the selection list. Terms used in debugger menus
and dialog boxes will be appropriate for the language you select. |
Advanced |
Click Advanced to open the Debugger Settings dialog
box. The Debugger Settings dialog box allows you to specify debugger options, JVM creation
settings and batch job creation settings. |
Select startup behavior |
You can choose to invoke any combination of the following start-up
options when you are attaching to an AS/400 job:
Use program profile |
Select this check box if you want the pane sizes, positions, fonts, and
breakpoints for your program restored from the last time you debugged the program. If you
are debugging the program for the first time, the debugger panes start up with their
default appearance, and no breakpoints are initially set. If you select this check box, any
changes you make to the panes and breakpoints are saved.
If you do not want this information to be restored or saved, do not
select this check box.
When the check box is cleared, the debugger panes start up with their default appearance, and
no breakpoints are initially set.
Attention: If you add or delete lines in your source file, recompile it,
and then debug the program again with a saved program profile, line breakpoints may no
longer match the code they were initially set for because line breakpoint information is
saved by line number, not by the content of the line. |
Step Into |
Select this check box if you want the debugger to stop at the first
debuggable statement that executes in the specified job. If you
select the Step Into check box, you will be asked to start your
AS/400 application
after clicking the Load push button.
If you do not select the Step Into check box, you will be able to view the source, add new programs or classes for debugging, and set
breakpoints after clicking the Load push button. If you
click the Run push button in the main debugger window, a message will prompt you to start
your AS/400 application. At this point, you will need to invoke
the application on the AS/400 if is not already running. Once the application
is running, click the message dialog's OK button. The application will
stop at the first breakpoint in the code. Once the application has started, it will
stop at the first breakpoint in the code.
|
|
Load a program without specifying a job
Controls and control groups in this
group are used as follows:
Job to debug |
Leave this field blank. |
Job List |
Use of this push button is not applicable. |
Specify the name of the program to add to debug |
Specify the name of the program you want to start for your debugging
session. You can enter the program name using the following formats:
- Library/program -- The debugger searches the specified library for the program. If the
program is not found in the specified library, an error message is displayed.
- Class name.
To locate a Java class that resides on IFS, you can map the IFS network drive to your
workstation, and click Browse to select the class on
the mapped network drive in
the Open dialog box. |
Enter any program parameters |
Enter arguments you want to pass to the selected program into this text
field. For example, if your program is designed to read a file name and the /xyz option
from the parameter list in that order, enter:
filename /xyz
|
Specify the language of the program to debug |
Select a language from the selection list. Terms used in debugger menus
and dialog boxes will be appropriate for the language you select.
If a Java class is
entered in the Specify the name of the program to add to debug field and
a non-Java language is selected, the debugger will display an error message.
|
Advanced |
Click Advanced to invoke the Debugger Settings dialog
box. The Debugger Settings dialog box allows you to specify debugger options, JVM creation
settings and batch job creation settings. |
Select startup behavior |
You can choose to invoke any combination of the following start-up
options when your program is loaded for debugging:
Use program profile |
Select this check box if you want the pane sizes, positions, fonts, and
breakpoints for your program restored from the last time you debugged the program. If you
are debugging the program for the first time, the debugger panes start up with their
default appearance, and no breakpoints are initially set. If you select this check box, any
changes you make to the panes and breakpoints are saved.
If you do not want this information to be restored or saved, do not
select this check box.
When the check box is cleared, the debugger panes start up with their default appearance, and
no breakpoints are initially set.
Attention: If you add or delete lines in your source file, recompile it,
and then debug the program again with a saved program profile, line breakpoints may no
longer match the code they were initially set for because line breakpoint information is
saved by line number, not by the content of the line. |
Step Into |
Select this check box if you want the debugger to stop at the first executable
statement in the program.
 
Note: If you wish to debug program initialization, do not select Step Into. |
|
|