× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 22 Feb 2013 14:44, James H. H. Lampert wrote:
On 2/22/13 2:37 PM, Buck Calabro wrote:
On 2/22/2013 5:24 PM, James H. H. Lampert wrote:

Does anybody know of a way to dump the variables of an OPM
program (similar to the "RPG-formatted dump" option of an escape
message) without having to force it into an exception state?

OPM RPG put the debug option in the H spec and use the DUMP
keyword. OPM CL, use the DMPCLPGM command.

Problem is, it's an MI program. A huge one. While I can certainly
insert an instruction that will blow up, I was hoping there was
something I could do without recompiling the thing.


I am not aware of a /formatted dump/ for MI OPM other than DMPJOB PGM(MIpgmName) JOBARA(*NONE) [although to call that /formatted/ may be a stretch]. But there is STRDBG. After starting debug, the values of the variables can be viewed with DSPPGMVAR, plus there are the Debugger APIs that should enable retrieving the values of variables [which could then be output and formatted as desired; i.e. create a formatted-dump feature].

Both STRDBG and DSPPGMVAR in conjunction with a listing could be used to obtain the value for all of the variables from the listing. I typically would write a REXX\CL script or CLP to perform one large or successive DSPPGMVAR for groups of variables that interested me. I have never had a reason to view all variables. The Debugger APIs may be able to provide a list of variables for the program, but IIRC that is only available for ILE programs; i.e. a listing in conjunction might be required when using the Debugger APIs just as with DSPPGMVAR.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.