Debugging IMS programs
This topic describes the following tasks:
- Another method of debugging IMS™ batch
programs interactively.
- What you must know if you want to debug IMS batch
programs in batch mode.
- Special steps you must take to debug non-Language Environment IMS MPPs.
- How to create private message regions to test IMS MPPs
by using Debug Tool Utilities.
Debugging IMS batch programs interactively by
running BTS in TSO foreground
If you want to debug an IMS batch program interactively, you
can use full-screen mode through a VTAM terminal or remote debug mode. This topic describes a third option,
which is to run BTS in the TSO foreground, by doing the following
steps:
- Define a dummy transaction code on the ./T command
to initiate your program
- Include a dummy transaction in the BTS
input stream
- Start BTS in the TSO foreground.
FSS is the default option when
BTS is started in the TSO foreground, and is available only when you
are running BTS in the TSO foreground. FSS can only be turned off
by specifying TSO=NO on the ./O command. When running in the TSO foreground,
all call traces are displayed on your TSO terminal by default. This
can be turned off by parameters on either the ./O or ./T commands.
Note:
If your source (C and C++) or listing (COBOL and PL/I)
does not come up in Debug Tool when you launch it, check that the source
or listing file name corresponds to the MVS library
name, and that you have at least read access to that MVS library.
Debug Tool can only be used to debug one iteration of a transaction
at a time. When the program terminates you must close down Debug Tool before
you can view the output of the transaction. Therefore, if you use
an input data set, you can only specify data for one transaction in
that data set. The data for the next transaction must be entered
from your TSO terminal. A new debug session will be started automatically
for the next transaction. When using FSS, you must enter the /* command
on your TSO terminal to terminate the BTS session.
Debugging IMS batch programs in batch mode
You can use Debug Tool to debug IMS programs
in batch mode. The debug commands must be predefined and included
in one of the Debug Tool commands files, or in a command string. The
command string can be specified as a parameter either in the TEST run-time
option, or when CALL CEETEST or __ctest is
used. Although batch mode consumes fewer resources, you must know beforehand
exactly which debug commands you are going to issue. When you run
BTS as a batch job, the batch mode of Debug Tool is the only mode available
for use.
For example, you can allocate a data set, userid.CODE.BTSINPUT with
individual members of test input data for IMS transactions
under BTS.
Debugging non-Language Environment IMS MPPs
You can debug IMS message processing programs (MPPs)
that do not run in Language Environment by doing the following tasks:
- Verify that your system is configured correctly and start a new
region. See Verifying configuration and starting a region for
non-Language Environment IMS MPPs for instructions.
-
Choose a debugging interface. See Choosing an interface and gathering information
for non-Language Environment IMS MPPs for instructions.
- Run the EQASET transaction, which identifies the debugging interface
you chose and enables debugging. See Running the EQASET transaction for non-Language Environment IMS
MPPs.
-
Start the IMS transaction
that is associated with the program you want to debug.
After you finish debugging your program, you can do one of the
following:
- Continue debugging another program.
- Disable debugging and continue running the region for other tasks.
- Disable debugging and shut down the region. If you want to debug
an IMS programs, you have to repeat tasks 2 to 4.
Verifying configuration and starting a region for
non-Language Environment IMS MPPs
Before you debug an IMS MPP that does not run in Language Environment,
do the following steps:
- Consult with your system administrator and verify
that your system has been configured to debug IMS programs
that do not run in Language Environment. See the Debug Tool Customization Guide for
instructions on how to include the APPLFE=EQANIAFE parameter string
in the JCL that starts a region and EQANISET.
- Start an IMS message processing region (MPR) that runs the
EQANIAFE application front-end routine whenever a message processing
program (MPP) is scheduled.
After you complete these steps, choose a debugging interface as
described in Choosing an interface and gathering information
for non-Language Environment IMS MPPs.
Choosing an interface and gathering information
for non-Language Environment IMS MPPs
Choose from one of the following debugging interfaces and gather
the indicated information:
- Use full-screen mode through a VTAM terminal without using the Debug Tool Terminal Interface
Manager. Obtain the terminal LU for this terminal. For example, TRMLU001. If
you are required to use the VTAM® network
identifier for the terminal LU, obtain this information from your
system programmer.
- Use full-screen mode through a VTAM terminal with the Debug Tool Terminal Interface Manager.
Obtain the user ID. For example, USERABCD.
- Use remote debug mode. Obtain the IP address and port number that
the remote debugger is listening to.
After you choose a debugging interface, run the EQASET transaction
as described in Running the EQASET transaction for non-Language Environment IMS
MPPs.
Running the EQASET transaction for non-Language Environment IMS
MPPs
When you run the EQASET transaction, you are indicating to the
EQANIAFE application front-end routine your debugging preferences
or requesting information about your existing preferences. You can
do one of the following options:
- Enable debugging by entering the command EQASET ON. You must have
already indicated a debugging preference by entering the EQASET command
with any other option except OFF.
- Disable debugging by entering the command EQASET OFF.
- Debug in full-screen mode through a VTAM terminal without the Debug Tool Terminal Interface Manager
by entering the command EQASET MFI=terminal_LU_name. If
you are required to specify a VTAM network
identifer, enter the command EQASET MFI=network_identifier.terminal_LU_name.
- Debug in full-screen mode through a VTAM terminal with the Debug Tool Terminal Interface Manager
by entering the command EQASET VTAM=user_ID.
- Debug in remote debug mode by entering the command EQASET TCP=IP_address%port_number.
- Display the current debugging preferences by entering the command
EQASET STATUS.
After you enter an EQASET command, on the same terminal, start
the transaction that is associated with the application program that
you want to debug.
Syntax of the EQASET transaction
The syntax of the EQASET command is displayed in the following
diagram:

>>-EQASET--+-MFI=--+------------------------------------------+-+-><
| '-+---------------------+-terminal_LU_name-' |
| '-network_identifier.-' |
+-VTAM=--+---------+---------------------------------+
| '-user_ID-' |
+-TCP=--+----------------------------+---------------+
| '-IP_address--%--port_number-' |
+-VTCP=--+----------------------------+--------------+
| '-IP_address--%--port_number-' |
+-ON-------------------------------------------------+
+-OFF------------------------------------------------+
'-STATUS---------------------------------------------'
The EQASET transaction manages a separate debugging setting for
each user that runs the transaction. Each setting is identified by
the user ID that is used to log on to the terminal where the transaction
is run. For any user ID, only the last debugging preference (MFI,
TCP, VTCP, or VTAM) entered is saved. You can use the STATUS
option to see the current debugging preference.
The following TEST runtime option string is constructed with the
debugging preference:
TEST(ALL,INSPIN,,debuggingPreference:*)
You cannot customize the other runtime options.
- MFI=
- Use full-screen mode through a VTAM terminal without the Debug Tool Terminal Interface Manager.
You must specify a VTAM terminal LU name for the debug
session. If your site requires that you specify the VTAM network
identifer, prefix the name of the VTAM network
identifier to the terminal LU name. Without specifying the terminal
LU name, debugging is turned off. No space is allowed after the equal
sign (=). The preference implies debugging is turned on.
- VTAM=
- Use full-screen mode through a VTAM terminal with the Debug Tool Terminal Interface Manager.
You must specify the user ID that was used to log on to the VTAM terminal
designated for a debug session. Without specifying the user ID, debugging
is turned off. No space is allowed after the equal sign (=). The preference
implies debugging is turned on.
- TCP= or VTCP=
- Use remote debug mode. Specify the TCP/IP address and port number
of the workstation where the remote debug daemon is running. Without
specifying the IP address and port number, debugging is turned off.
No space is allowed after the equal sign (=). The preference implies
debugging is turned on. You can specify the TCP/IP address in
one of the following formats:
- IPv4
- You can specify the address as a symbolic address, such as some.name.com,
or a numeric address, such as 9.112.26.333.
- IPv6
- You must specify the address as a numeric address, such as 1080:0:FF::0970:1A21.
If you use IPv6 format, you must use the TCP= option; you cannot use
the VTCP= option.
- ON
- Turn on debugging. This is valid only when a debugging preference
(MFI, TCP, VTCP, or VTAM) has been set.
- OFF
- Turn off debugging.
- STATUS
- Display the current debugging preference. The EQASET transaction
displays only the first 25 characters of the IP address.
Creating setup file for your IMS program
by using Debug Tool Utilities
You can create setup files for your IMS Batch
Messaging Process (BMP) program which describe how to create a custom
region and defines the STEPLIB concatenation statements that reference
the data sets for your IMS program's load module and the Debug Tool load
module. You can also create and customize a setup file to create a
private message region that you can use to test your IMS message
processing program (MPP). Creating a private message region with class
X allows you to test your IMS program run by transaction X and
reduce the risk of interfering with other regions being used by other IMS programs.
To create a setup file for your IMS program
by using Debug Tool Utilities, do the following steps:
- Start Debug Tool Utilities. If you do not know how to start Debug Tool Utilities,
see Starting Debug Tool Utilities.
- In the Debug Tool Utilities panel (EQA@PRIM), type 4 in the Option
line and press Enter.
- In the Manage IMS Programs panel (EQAPRIS), type
2 in the Option line and press Enter.
- In the Create Private Message Regions - Edit Setup File panel
(EQAPFORA), type in the information to create a new setup file or
edit an existing setup file. Press Enter.
Create a private message
region to customize your application or Debug Tool libraries while you
debug your application so that you do not impact other user's activities.
Consult your system administrator for authorization and rules regarding
the creation of private message regions.
After you specify the setup information required to run
your IMS program, you can specify the information needed
to create a private message region you can use to test your IMS program
or specify how to run a BMP program. To specify this setup information,
do the following steps:
- In the Edit Setup File panel (EQAPFORI), type in the information
to start IMS batch processor. Type a forward slash (/) in
the field Enter / to modify parameters, then press Enter to modify
parameters for the batch processor.
- In the Parameters for IMS Procedures panel (EQAPRIPM), use
one of the following values in the TYPE field to indicate which action
you want done:
- MSG to start a private message region.
- BMP to run a BMP program.
Enter other parameters as needed. Press PF1 for information
about the parameters.
- After you type in the specifications, you can submit your job
for processing by pressing PF10.
|
This information center is powered by Eclipse technology. (http://www.eclipse.org)