DEBUG COBOL/400 PROGRAM
0
Q:
DEBUG COBOL/400 PROGRAM
PLEASE GUIDE ME HOW CAN DEBUG A COBOL/400 PROGRAM?
ASKED: Jun 29 2009  12:00 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
65 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   1
  •  -1
  • AddThis Social Bookmark Button
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 ...
Last Answered: Jul 24 2009  7:21 AM GMT by Supriyob2   65 pts.
Latest Contributors: Teandy   3165 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

R.otto   435 pts.  |   Jun 30 2009  7:10AM GMT

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!

 
0