RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

GUI Debugging System i Programs Print E-mail
User Rating: / 0
PoorBest 
Written by Chamara Withanachchi   

Extracted for Systemi Network Web Site Credit goes to Original Author


 

The debugger was officially released with V5R2 of OS/400, but it can be installed on a V5R1 system by installing two PTFs, SI02871 and SI02849. You'll also need the IBM Toolbox for

Java (5722-JC1) installed on your iSeries. Once installed, you can start the iSeries side of the debugger on your V5R2 or later system by typing the following command:

STRTCPSVR SERVER(*DBG)

Or, on a V5R1 system, you can start it by typing the following:

CALL QSYS/QTESSTRSVR 
		

You'll also need to install the user interface on the workstation that you'd like to do the debugging from. To do that, take the following steps:

 

If you don't already have it, you'll need version 1.3 or later of the Java Runtime Environment installed on your PC. You can download this from IBM's DeveloperWorks Web site at the

following link:


http://www-128.ibm.com/developerworks/java/jdk/

 

You can also get the JRE from Sun's Web site at the following link:


http://java.sun.com/products/javahelp/


I created a directory to install my system debugger files into. On my Windows system, I called the directory C:\SysDbg
You'll need to get the jhall.jar file from Sun's JavaHelp package. If you have WDSc installed, you can copy that file from the C:\WDSC\JAVA directory to the C:\SysDbg directory. If

you don't have WDSc installed, you can download the JavaHelp software from Sun's Web site at the following link:


http://java.sun.com/products/javahelp/


You'll also need to copy two JAR files from your iSeries to the C:\SysDbg directory. The two files are called jt400.jar and tes.jar, and you can find them in the

/QIBM/ProdData/HTTP/Public/jt400/lib directory of your IFS.


Once you have everything installed, you need to add the JAR files that you downloaded to Java's CLASSPATH and launch the Debug Manager. On my Windows system, I wrote a little

.BAT file to do this. I called it DebugMgr.bat, and it contains the following code:

 

@echo off
set CLASSPATH=%CLASSPATH%;c:\sysdbg\jhall.jar
set CLASSPATH=%CLASSPATH%;c:\sysdbg\jt400.jar
set CLASSPATH=%CLASSPATH%;c:\sysdbg\tes.jar
java utilities.DebugMgr


If you're running a Unix-like system such as FreeBSD or Linux, you'll have to use a different directory and set up the CLASSPATH in a shell script instead of a batch file.

 

To start the debug manager, simply run the batch file. If all is well, a Window entitled "iSeries Debug Manager" will pop up on your screen. The next step is to click Edit|Add System to

connect the debug manager to your iSeries.

 

Once the debug manager has been connected, the user-id that you signed on with will be registered to use the iSeries System Debugger. If you have additional iSeries systems that

you'd like to connect to, you can click Edit|Add System again to add them. Likewise, if you have alternate user names on your iSeries, you can register them for use with the GUI

debugger by clicking Edit|Add User.

 

There are three ways to start an actual debug session in the iSeries System Debugger.

 

One way is to click Debug|Start Debug from the debug manager. I've found this to be the easiest way for batch jobs.
You can also start it using the STRDBG command from the iSeries, the same command that you'd use for the green screen tool. When your userid is registered through the debug

manager to use the GUI debugger, STRDBG will automatically start it instead of the green screen one.


You can also start the debugger from the Windows command prompt by typing (though I don't see why you'd want to) the following command:


java utilties.Debug


The iSeries System Debugger is a modern, powerful tool for debugging your iSeries programs. If you're used to the green-screen tools, there might be a learning curve before you

have the hang of it, but once you're beyond that curve, you won't want to go back!

<Previous   Next>