Objective
The
objective of this sample is to trace and debug a distributed application in step by step
mode. Both server and client code are written in C++ and installed on OS/390.
For this exercise, the OLT server, viewer, client controller, and debugger user interface are running on a Windows NT/2000 workstation. Your client and server applications together with the debugger engine are running on an OS/390 system.
The OS/390 client and server applications can be generated on an AIX or Windows NT/2000 system. For this scenario, we will assume that the code is generated on the Windows NT/2000 system that is running the OLT server.
Preparing to run the OLT sample
Follow these step to set up your system to run the OS/390 OLT sample:
From a
command prompt on a Windows NT/2000 system, change to your working directory and generate code
for debugging, as follows:
cd x:\CBroker\samples\InstallVerification\ProgrammingModel obgen -pBusinessObjects\Policy -aAll -t390 -OIVB_TRACE_DEBUG
The code will be generated into a 390 subdirectory. The source code on this system will be used for debugging.
to the OS/390 system, for example, $IVB_DRIVER_PATH/samples/Policy/Working/390 and $IVB_DRIVER_PATH/samples/Policy/Working/390/TRACE_DEBUG, respectively.
export IVB_TRACE_DEBUG=1 | |
export STEPLIB=none | # no compiler override |
export _CEE_PREFIX=SYS1.CEE | # default LE |
export _CEE_CBC=SYS1.CBC | #default compiler |
export CB390_ROOT= <path_to_CB> |
# where <path_to_CB> is the full path to where Component Broker is installed. |
export IVB_DRIVER_PATH= $CB390_ROOT/usr/lpp/CB390 |
|
export CB390_ENVFILE= $IVB_DRIVER_PATH/samples/CB390make.env |
# this file is needed by the Object Builder-generated makefile |
export NOHFSLNKOUT=1 |
IVB_TRACE_DEBUG=1
make -f all.mak cpp
Where all.mak is the Object Builder generated makefile.
IVB_DEBUG_ENABLED=1
Ensure that the OLT load modules are accessible from your OS/390 server and client. That is, IVBTR30I and IVBTRMSG must be authorized.
Use the OS/390 component Broker Administration tool to update the application server properties, as follows:
APF FORMAT(DYNAMIC) LPA DELETE MODNAME(JPOLICYS) FORCE(YES) CURRENT LPA DELETE MODNAME(JPOLSQMO) FORCE(YES) CURRENT LPA DELETE MODNAME(JPOLTRIR) FORCE(YES) CURRENT LPA DELETE MODNAME(POLICYC) FORCE(YES) CURRENT LPA DELETE MODNAME(POLICYS) FORCE(YES) CURRENT LPA DELETE MODNAME(POLSQIR) FORCE(YES) CURRENT LPA DELETE MODNAME(POLTRIR) FORCE(YES) CURRENT LPA DELETE MODNAME(POLHMIR) FORCE(YES) CURRENT LNKLST ADD MODNAME(JPOLICYS) DSNAME(BOSSBET.TESTING.SBBOLOAD) LNKLST ADD MODNAME(JPOLSQMO) DSNAME(BOSSBET.TESTING.SBBOLOAD) LNKLST ADD MODNAME(JPOLTRIR) DSNAME(BOSSBET.TESTING.SBBOLOAD) LNKLST ADD MODNAME(POLICYC) DSNAME(BOSSBET.TESTING.SBBOLOAD) LNKLST ADD MODNAME(POLICYS) DSNAME(BOSSBET.TESTING.SBBOLOAD) LNKLST ADD MODNAME(POLSQIR) DSNAME(BOSSBET.TESTING.SBBOLOAD) LNKLST ADD MODNAME(POLTRIR) DSNAME(BOSSBET.TESTING.SBBOLOAD) LNKLST ADD MODNAME(POLHMIR) DSNAME(BOSSBET.TESTING.SBBOLOAD)
LNKLST UNDEFINE NAME(DTOLT) LNKLST DEFINE NAME(DTOLT) COPYFROM(CURRENT) LNKLST ADD NAME(DTOLT) DSNAME(BOSSLAP.DT1R20.SEQAMOD) ATTOP LNKLST ACTIVATE NAME(DTOLT)
where BOSSLAP.DT1R20.SEQAMOD is the name of the Debug Tool dataset. The Debug Tool is installed and shipped with OS/390 C++.
IVB_DEBUG_ENABLED=1
Description
In this exercise, you will complete these steps:
Sample instructions
Follow these steps to perform the tracing and debugging for this scenario:
set prog=y3
where y3 is the prog that you have defined to load the OLT Debug enabled application DLLs.
Then start the Component Broker daemons and activate the application, as follows:
s bbodmn s bboctl
Note: Do not use the Client Controller page in the OLT Viewer window.
s bboivpj
The OLT Viewer soon displays trace lines and event symbols:
Now you can perform source level debugging tasks, such as setting breakpoints and monitoring variables, in the server code.
At this point, you can set breakpoints on any of the debuggable server events (shown as filled circles on the Policy trace). If you rerun the application client, the debugger opens only on your breakpoints.