DEBUG COBOL/400 PROGRAM

Tags:
COBOL
COBOL DEBUG
COBOL debugging
COBOL/400
COBOL/400 Debugging
debug
Debugging
Software Quality
PLEASE GUIDE ME HOW CAN DEBUG A COBOL/400 PROGRAM?
ASKED: June 29, 2009  12:00 PM
UPDATED: July 24, 2009  7:21 AM

Answer Wiki

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

You can do it this way:

compile it with option 14 and press F4……

next press F10 and put *srcdbg or *lstdbg in OPTION field
and complie

After sucessful compilation…write STRDBG in command line and press F4 …put *yes in fileds UPDPROD
OPMSRC …….. and press enter…..The system will show you the program in debug mode..put F6 (break) in the line you wish to debug…Press F3 and come out…then call the program the way you need….

Supriyo …

Discuss This Question: 1  Reply

 
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
  • r.otto
    First you must compile the program with: DBGVIEW(*LIST). If it is an interactive program you can run STRDBG and then either call the program directly or start the job in which the program is called. If it is a program that runs in batch it gets more complicated: 1. Hold the job queue where the program will be submitted 2. Submit the job 3. Hold the submitted job 4. Release the jobq, and if required change the jobq. 5. Start servicing the submitted job using STRSRVJOB JOB(number/user/name) (Start Service job), where "number", "user' and "name" are attributes retrieved from the submitted job. 6. Start the debugger using STRDBG PGM(library/program) UPDPROD(*YES) (Start Debug) 7. You are now in the display module source. Don't try to debug or add breakpoints. It's too early. The job must be active before. Leave this screen using F12. 8. Release the held job. 9. When the job is activated, the start service job window comes. Use F10 to enter debug command. 10. Use DSPMODSRC (Display module source) command to go back to the source and add breakpoint wherever you want, using F6 11. Use F12 to resume the job, and F12 once again to go back to the start service job window. 12. Use Enter to launch the job. 13. The process breaks at the first breakpoint installed and gives you the control. 14. Debug....my friend 15. When the job is finished, you receive a 'Job being serviced ended' message. 16. Use ENDDBG command to end debug. 17. Use ENDSRVJOB to end servicing That's all!
    810 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