RPG Debugger

205 pts.
AS/400 development
I work for a small AS/400 shop. For the most part, we are still coding in RPGIII and doing green screen applications. Due to a recent Lawson upgrade, we have had to convert a large chunk of our code to ILE. Myself and the other programmer here are used to the Interactive debugger and using the old PDM for development (I know, we are hopelessly stuck in the dark ages). It appears that once the pgms are converted to ILE, you can no longer use the interactive debugger. We have tried using STRDBG and while this works, it's a huge pain in the rear (perhaps we are doing something wrong). I loaded WDSC 7.0, I have it connected to the AS/400. I can review source code, and even make changes in it. I must say though, I find it's one tool to fit all approach as anything but intuitive. I can't seem to get it to compile pgms and/or debug pgms. I know from threads on here that I probably do not have all the proper licensed PGMs installed nor all the PTF's that I need to make it run properly. My main question before I invest tons of time in it, is this the right way to go? I am kind of feeling overwhelmed and behind in the last oh, uh decade or so of changes. Is there suggestions perhaps of where best to start with updating my skill set to bring me more current. Books, forum threads, redbooks, etc. In the end, I might end up thanking Lawson for forcing us to make this change, but right now, I am feeling about as green as I did the first time I set down at an AS/400 console some 16 or so years ago. Any help is greatly appreciated.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Regarding debug, you can use the STRDBG command to for source debugging of either OPM (such as RPG III) or ILE (RPG IV) programs. All you have to do is to make sure your programs are compiled with either the *LSTDBG or *SRCDBG options for OPM, and *LIST, *SOURCE (or *ALL) in the debug view for ILE.

Example for OPM RPG / RPG III:




List is preferable, because it doesn’t require having the source member available when debugging the object, such as if you have the program object on a different machine than where it was originally compiled.

Then, when you start debug, if you want to debug an RPG III program, just specify that you want to debug an OPM program:

This will give you the source view debugging capability. If you want to debug an ILE program, you won’t need the OPMSRC option, although it will still work either way.

I still use SEU sometimes as it’s still a workhorse, but overall, the new editors like WDSC with RSE blow it away in functionality and useability.

In my view, this is why it’s important to stay current with technology and avoid getting stuck for too long in one’s comfort zone. Since IBM hasn’t officially sold an AS/400 since 2000, I’ve been referring to the system formerly known as AS/400 by its more current names — iSeries, System i, and now with the Power Systems hardware consolidation, it’s really just an operating system, IBM i. So how about just “The i”, for short.

I think the sucess of the i has also become one of its drawbacks now — it has supported old code and coding methods for compatibility, but that results in many of its biggest advocates and companies which use it not moving forward. Now there are many people who don’t know how great of a system it is, and think it’s a “legacy” system. That misperception has become one of my biggest gripes. I sure hope it doesn’t end up as a deprecated system, because it’s far from obsolete.

As far as where to start on upgrading your knowledge, there are so many ways to go, and I’m sure others here will have some good suggestions. There are many web sites from which I’ve gotten great tips and insight, as well as books. A book I read about 10 years ago which got me started was RPG IV Primer – I don’t remember the author, but you could probably find via a search. Bob Cozzi has some good books too. And there are many, many others, of course.

Some good websites are:

Again, there are many many more, and I think others here can give some good tips as well.


Here in south africa we use strdbg a lot. It is a learning curve. You can type in things like this. break 9999 (line no) when xxx(field) is = ‘XXXX’and this will stop on that line when the codition is met. to find the valve type eval xxxx (field) and to chanhe type eval xxx = ÝYY”

Discuss This Question: 3  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Cwc
    This looks like a good book, similar to the RPG IV primer book I mentioned: http://www.bmeyers.net/jumpstart.php
    4,290 pointsBadges:
  • Cwc
    Sorry, the link didn't come through - here it is. http://www.bmeyers.net/jumpstart.php
  • graybeard52
    I gave up SEU several years ago. Since you have WDSC 7, the RSE editor is THE way to go, esp on RPG. There is a learning curve, but its well worth it. As for STRDBG, I would skip it and use the graphical debugger in WDSC. It takes a little getting used to, but is much easier to use.
    3,115 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: