Utility helps you trace RPGLE programs
Need to trace an RPGLE program? Forget F10=Setup. Try this utility instead.
Recently I had to trace RPGLE program and then I realize that there is no real option to do that.
Continue Reading This Article
Enjoy this article as well as all of our content, including E-Guides, news, tips and more.
For the ADDTRC (Add Trace) Command I found in the manual that
"This command cannot be used to trace bound programs" (what a pity...)
Well, on that occasion I used the F10=Step until I got a blister in my finger...
I looked around and I found a full set of APIs for debugging.
I decided to write a simple trace utility and share it with the rest of the community.
The full source set includes the following:
Source file.Member
|
Type
|
Description
|
Note
|
QCLSRC.TRCINS |
CLP |
After you upload all the sources to your library use this program to compile. |
|
QDDSSRC.GEDDS99 |
PF |
|
|
QDDSSRC.TRACEIT |
PF |
|
|
QRPGSRC.TRC002M01 |
RPGLE - Module |
|
|
QRPGSRC.TRC004M01 |
RPGLE - Module |
|
|
QRPGSRC.TRC010M01 |
RPGLE - Module |
|
|
QRPGSRC.TRC012M01 |
RPGLE - Module |
|
|
QRPGSRC.TRC010M00 |
RPGLE |
No compile needed |
|
QRPGSRC.TRC012M00 |
RPGLE |
No compile needed |
|
QRPGSRC.TRC010 |
SRVPGM |
The source contain the parameters for the CRTSRVPGM Command |
|
QRPGSRC.TRC002 |
PGM |
Session Handler. |
The source contain the parameters for the CRTPGM Command |
QRPGSRC.TRC004 |
PGM |
Program-Stop Handler. |
The source contain the parameters for the CRTPGM Command |
QCMDSRC.TRACEIT |
CMD |
|
|
QCLSRC.TRACEIT |
CLP |
|
Using TRACEIT
- Make sure your program is compiled with DBGVIEW(*SOURCE).
also use OPTION(*NODEBUGIO) for performance boost. - Use command TRACEIT (Use the command prompter).
- Run your program.
- Use ENDDBG (End Debug) this is important so QTEMP/TRACEIT will be complete.
- Check the content of file QTEMP/TRACEIT.
Final note
- This utility was developed on V4R4M0 machine.
- This utility is quite recent which means that it might contains some hidden bugs. (Beware...).
- At the moment this utility works only with programs where the entry module name euals the program name (CRTPGM ENTMOD(*PGM) or using the CRTBNDRPG Command). I hope to add moe code to fix that in a later version.
- This utility was designed for RPG IV programs.
Happy tracing