RPG Debugger

205 pts.
Tags:
AS/400 development
RPG ILE
STRDBG
WDSc
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:
CRTRPGPGM PGM(MYLIB/MYPROGRAM) OPTION(*LSTDBG) [or OPTION(*SRCDBG) ]

For RPG IV:
CRTBNDRPG PGM(MYLIB/MYPROGRAM) DBGVIEW(*LIST) [or DBGVIEW(*SOURCE) ]

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:
STRDBG PGM(MYLIB/MYPROGRAM) OPMSRC(*YES)

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:
<a href=”http://www.mcpressonline.com”>www.mcpressonline.com</a>
<a href=”http://www.ibmsystemsmag.com/”>http://www.ibmsystemsmag.com/</a>
<a href=”http://ibmsystemsmag.blogs.com/”>http://ibmsystemsmag.blogs.com/</a> (This is a great blog of Jon Paris and Susan Gantner, two former IBMers who are very active in training at development conferences such as Common, DevCon, etc. They have many detailed articles on numerous topics about the “i”. Here are two writeups they did on debugging: <a href=”http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/18805p1.aspx”>http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/18805p1.aspx</a>
<a href=”http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/18995p1.aspx”>http://www.ibmsystemsmag.com/ibmi/enewsletterexclusive/18995p1.aspx</a>

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

CWC
——————————————————

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • 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:
    report
  • Cwc
    Sorry, the link didn't come through - here it is. http://www.bmeyers.net/jumpstart.php
    report
  • 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:
    report

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following