Check to see how an AS/400 program was compiled

50 pts.
Tags:
AS/400
STRDBG
STRISDB
Hi all,
I am trying to determine how a compile setting was used when a program was compiled. Specifically, the OPTION field. I need to know if an object was compiled with *SOURCE or without source. I am writing a debugger, so if the program was compiled with *SOURCE view (RPGIII), it will use my debugger. Otherwise, it defaults to the standard STRISDB. The reason for this is that often we have to use STRISDB, but sometimes the job list running on the AS400 is in the thousands, if not 10's of thousands. If you use *SELECT as the STRISDB option, you have to page down forever just to find the job you want to service. Surprisingly, this list is not in any easy order to follow. I tried using DSPOBJD to an outfile, but didn't see anything in there. I'm sure it's stored somewhere, perhaps accessible only through an IBM API?
Thanks!

Answer Wiki

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

I have worked with on the s/38 since the 1980’s. Trying to write your own debugger is a major task. What do you hope to accomplish that the IBM debugger cannot provide? I don’t recall seeing the “Option” value of an object showing up where you would have access to it. There may be an API but I have not run across it. You may want to check out some of the IBM forums and see if they can point you in the right direction. Check out the link here.

Discuss This Question: 7  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.
  • Splat
    DSPPGM will provide you more information than DSPOBJD.
    11,185 pointsBadges:
    report
  • Subhendu Sen

    Please see here for more information about commands: http://whatis.techtarget.com/reference/Common-AS-400-commands

    89,360 pointsBadges:
    report
  • cooldht
    Yes, DSPPGM shows you a little more.  However, it doesn't show the OPTION parameter that was used during the compile (from what I can tell).  Anyway, you cannot save the DSPPGM to an out file programmatically, so it wouldn't help.  I'm sure there's an API that could do it, but I haven't found it yet.

    I've been working with the AS400/System 36 since 1991, so I know it very well.  I just don't know where this particular piece of information is stored and how it's retrieved (or if it's even possible).
    50 pointsBadges:
    report
  • cooldht
    Hi Todd,

    I'm not really trying to write a debugger from scratch. Yes, that would be an undertaking. I'm really just writing a front end program. It actually works with RPGLE & STRDBG. It basically just saves a few keystrokes by looking at a file of ours which contains the job numbers of jobs running in our subsystem, then only lists those jobs to be selected from the list. This is to keep you from having to do the STRSRVJOB manually. I'd like to do that with RPG as well, as the *SELECT list can contain thousands of jobs. Why there is no sort by is beyond me, and having to page down forever doesn't work either. My only recourse now (i think) is to check to see if the program is compiled with *SOURCE view. If so, I just run STRDBG with OPM (*YES) turned on after starting a service job. If not compiled with *SOURCE, then it moves it to a temporary library and compiles it with *SOURCE, then runs STRDBG with OPM (*YES). I've been looking every once in a while for more than a year, but can't see any other avenue. Hopefully I'm not completely off base with my thinking.
    50 pointsBadges:
    report
  • GregManzo
    Try compiling with DBGVIEW(*ALL) or DBGVIEW(*LIST), that way you can use IBM's debugger regardless of where the source is.
    1,720 pointsBadges:
    report
  • cooldht
    Thanks, but RPG doesn't have a DBGVIEW option on the compile. That's only RPGLE. In either case, we don't distribute with source. Anyway, I have made a work around. I was trying to make it automatic to the user, but since that doesn't seem to be possible, I added a parameter to the debugger to use STRISDB by default, but an option to STRDBG with OPM if the user knows to compile with *SRCDBG. It's not perfect, but it will do for now. Thanks for the suggestions.
    50 pointsBadges:
    report
  • WoodEngineer
    Is the manually submitted job going to a different job queue than the automatically submitted job? Perhaps there are other jobs in the queue ahead of the manually submitted job.
    7,500 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.

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

Following

Share this item with your network: