LppEdd
LppEdd

Reputation: 21172

Retrieve source from compiled ILE Program (with DBGVIEW)

Instead of using STRDBG to look at the source, is there an API to retrieve the complete source code from a program compiled with DBGVIEW(*ALL)?
Should I use the debug APIs, or does something simpler exists?

Upvotes: 1

Views: 998

Answers (2)

Charles
Charles

Reputation: 23823

Easier is a matter of opinion...

One time thing? Perhaps copy & paste from one of the existing graphical debuggers (RDi or System)

Need to extract source from multiple objects, then yeah the debugger API's are the way to go.

But how comfortable are you with working in C? Or at minimum, translating C prototypes to usable RPGLE ones? IBM does provide an RPGLE include file, QSYSINC/QRPGLESRC(QTEDBGS) but it's a machine translation of the C header and not particularly optimized for an RPG developer to use.

The easy way would to break out the checkbook and buy an existing tool do this. I assume some are still around.

Upvotes: 1

LppEdd
LppEdd

Reputation: 21172

It seems the only way is to use the exported debug C APIs, as described in this document.

Those C APIs are also exposed through an RPG service program under QSYS/QTEDBGS. This makes it possible to invoke them via JTOpen for example (see ServiceProgramCall).

enter image description here

Upvotes: 1

Related Questions