× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Brian, 

The following are the instructions from Brad Stone's site
(www.bvstools.com/faq.htm):

How do I debug an RPG program in batch? 

Submit your program into batch and make sure it is held. Do this by
either holding the job queue that you are submitting the job to, or use
the HOLD(*YES) option on the SBMJOB command. 

Use the WRKUSRJOB and display the job you with to debug with the display
job option (5). 
Write down the user name, job name and number. 
Start a service job using STRSRVJOB entering the name, job name and
number from the previous step. 
STRDBG PGM(YOURPGM) - Press F12 to exit the source display (Sorry, can't
enter breakpoints yet). 
Release your submitted job by releasing the job queue or the job itself.

A display will appear asking you to press F10 function key. Press F10
and you will be brought to a command line. 
Enter DSPMODSRC and enter your breakpoints. 
Leave source display and command line by pressing F3 until you are back
to the screen that asks you to press F10 to enter breakpoints. 
Press Enter to start your job. 
After that the job begins running and stops at the first breakpoint
reached.

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Brian Piotrowski
Sent: Wednesday, August 24, 2005 3:09 PM
To: Midrange Systems Technical Discussion
Subject: Debugging a Program Called from Batch

Hi All,

 

Is there a way to debug a program that is run from a batch job?  We have
a few programs that will submit a batch job that runs a series of RPG
programs.  One of these programs I would like to debug, but when I
compile the source, start debug and submit the batch job, the program
will whip through everything without stopping on the specific breakpoint
in the RPG program.

 

So within the CL batch job we have:

 

Program A

Program B

Program C

Program D <-- I would like to debug this program

Program E

 

The only way we have found to get around this problem is to put a
breakpoint within the CL program on the call to the RPG program we want
to debug (for our example, Program D).  When it hits this point, we stop
processing and then manually run the RPG program (the previous programs
in the Batch job (Prog A - C) need to run because they generate the data
needed for this RPG program).

 

Anyone have any ideas?

 

Thanks!

 

Brian.

 

-=-=-=-=-=-=-=-=-=-=-=-=-=-

Brian Piotrowski

Specialist - I.T.

Simcoe Parts Service, Inc.

Ph: 705-435-7814 x343

Fx: 705-435-6746

bpiotrowski@xxxxxxxxxxxxxxx

-=-=-=-=-=-=-=-=-=-=-=-=-=-

 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.