Can one use strdbg to trace code through a interactive program that allows update to display screens

385 pts.
Tags:
DDS
RPG Date Formatting
RPG debugging
RPG ILE
RPGLE
STRDBG
Can one use strdbg to trace code through a interactive program that allows update to display screens. I can get  the add item and delete item part to work but not the update/change function which craps out with a error message. There seems no reason for this message, but there has to be a reason for it.  

Software/Hardware used:
as400, RPG
ASKED: October 13, 2009  8:59 PM
UPDATED: October 16, 2009  11:53 PM

Answer Wiki

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

Yes, you can debug per your earlier request

http://itknowledgeexchange.techtarget.com/itanswers/how-to-use-debug-on-a-interactive-program-with-subfiles/

Please let us know what problems your having with debug.

Phil

Ok the interactive RPG file will not compile when I use CRTBNDRPG or CRTRPGMOD which I have to used to get to the debug views option. Our system uses CRTRPGPGM as the option 14 which will create a good compile but no debug views to modify to *list. so in either case when use STRDBG and change update prod to *yes and hit enter nothing happens and no lines of code appear to set breakpoints. If I F3 out and perform a call to the display pgm I go straight into the display screens and not into the lines of like I would expect.

————-
Oh — is this an RPG or RPGLE program?
As Yorkshireman said use STRISDB for RPG, use STRDBG for RPGLE.
Phil

——————————————————–

Change the type? If you’ve got an RPG program you have to convert the source code to rpgle!
CVTRPGSRC

On RPG source CRTBNDRPG would throw lots of errors since it assumes column positions based on RPGLE.

Or if you want to stay with RPG then you cannot use STRDBG but you can use STRISDB.

Phil

Discuss This Question: 9  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
  • CharlieBrowne
    What is the error message? THat would help us point you in the right direction to correct your problem.
    39,835 pointsBadges:
    report
  • nitzinger
    Ok the interactive RPG file will not compile when I use CRTBNDRPG or CRTRPGMOD which I have to used to get to the debug views option. Our system uses CRTRPGPGM as the option 14 which will create a good compile but no debug views to modify to *list. so in either case when use STRDBG and change update prod to *yes and hit enter nothing happens and no lines of code appear to set breakpoints. If I F3 out and perform a call to the display pgm I go straight into the display screens and not into the lines of like I would expect.
    385 pointsBadges:
    report
  • Yorkshireman
    use CRTBNDPGM, and in the parameters for the compile, use *source in the 'Debugging views' option You'll get a program that will give a debiug view with source lines. or you can use STRISDB for an OPM *PGM
    5,520 pointsBadges:
    report
  • nitzinger
    Tried CRTBNDPGM and get a not found in *libl message. When I used CRTBNDRPG I get a 'Compilation stopped. Severity 40 errors found in program.' error message. With all external files fields getting flag for not being found. This interactive screen code is of type RPG. My none interactive screen code programs compile fine and work with the STRDBG function. So what makes this screen display program so different to not work where my other none screen display code will work in Debug mode?
    385 pointsBadges:
    report
  • CharlieBrowne
    If your source type is RPG, change it to RPGLE and compile the program. When you were compiling the programs and getting the level 40 errors, that would be a LIBL problem.
    39,835 pointsBadges:
    report
  • TomLiotta
    If you want to use CRTRPGPGM and STRDBG, then you'll need to specify OPTION(*SRCDBG) when you compile the RPG program. When you debug, run STRDBG mypgm OPMSRC(*YES). Tom
    125,585 pointsBadges:
    report
  • Vatchy
    Nobody else has mentioned this so I will: when you enter 14 to compile the program press F4 to prompt the command and then you can change the debug view (and other options, if necessary) before it is compiled.
    1,410 pointsBadges:
    report
  • Teandy
    You can't set debug views with the CRTRPGPGM command. If you want to do that, you need to convert the program to RPGLE. You can use the CVTRPGSRC to do that. If you decide to go that route, you can look at changing the command default to be the debug option of your choice. That way you don't have to remember to prompt the compile command. We set ours as follows:
    CHGCMDDFT  CMD(CRTBNDRPG) NEWDFT('AUT(*ALL) +  
                 DBGVIEW(*ALL) USRPRF(*USER)')     
    
    
    Just keep in mind that if you upgrade the OS to a new release, you will need to run the CHGCMDDFT command again.
    5,860 pointsBadges:
    report
  • Cwc
    ^ Actually, you can set the debug view through the CRTRPGPGM command. An OPM (original program model) program can be source debugged just as an ILE program can. You do not have to convert it to RPG IV, although there are many good reasons to do so. As has been previously discussed, this is done via the OPTION keyword in the CRTRPGPGM command. The values you can use to achieve source debug are either *SRCDBG or *LSTDBG.
    4,290 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