Recently I had to trace RPGLE program and then I realize that there is no
real option to do that.
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:
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