Re: MI program unable to locate job - need assistance
"Rich Hart" <[email protected]> Tue, 13 May 2008 12:59:14 -0500
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <002b01c8b523$0e42f0d0$020fa8c0@NORIHART> |
Hi Paul, The comments by James Lampert are correct, but it is tedious to use the standard OPM debugger (using the MI instruction numbers to set breakpoints). You can also, as is coded in your program, use the BRK pseudo-op to set breakpoints, which the debugger recognixes. It's okay for short programs. I also have an MI debugger which works in a way similar to the ILE debugger. That is, it has a similar interface; of course, it's a front-end to the standard STRDBG command. It lets you debug an MI program at the source level, set breakpoints with F6, use the EV command to display variables (including dotted variables), etc. It has a few weaknesses, one of which is that I did not write it to recognize RELATIVE branch points (in the single-step debug mode). That is, an instruction like CMPBLA CHAR-FIELD-ONE, CHAR-FIELD-TWO / EQ (=+2); would confuse it. It recognizes labels as branch points, as well as normal subroutine call/return operations (CALLI). This should not be a problem with the F6 key; just if you want to do single-step debugging (the branch point would not be recognized). Anyway, I thought about enhancing it to do more robust parsing, but as you know, there's not too much demand for MI tools these days! It's a fun thing to play with though. Regards Rich ----- Original Message ----- From: "James Lampert" <jamesl-6/ELSmrcqeUu8xhjR5IN5AC/[email protected]> To: "MI Programming on the AS400 / iSeries" <mi400-Zwy7GipZuJhWk0Htik3J/[email protected]> Sent: Tuesday, May 13, 2008 1:40 PM Subject: Re: [MI400] MI program unable to locate job - need assistance > Paul Jackson wrote: >> Hi Richard, >> >> this was code that I obtained from Tim McCarthy when he was at >> Trailblazer >> systems ca. 1996. I've never debugged an MI program before. Any tips on >> how to do this? > > To begin with, you need a compilation listing. Debugging is through the > OPM debugger, by hexadecimal instruction number; all variables can be > accessed through DSPPGMVAR unless their names start with periods. > > When setting breakpoints, use the instruction number (I don't have a > compilation listing in front of me, but I believe it's the second > column, the one that shows an ascending sequence of hexadecimal > numbers). For example, if the instruction of interest is at instruction > number 002D, then you would set your breakpoint at '/002D' (including > the slash and the single quotes, to tell the debugger that you want an > instruction number rather than a HLL statement number). > > -- > James H. H. Lampert > Touchtone Corporation > > _______________________________________________ > This is the MI Programming on the AS400 / iSeries (MI400) mailing list > To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/mi400 > or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] > Before posting, please take a moment to review the archives > at http://archive.midrange.com/mi400. > > _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.