That is timely, last week Midrange Server ran a tip on
debugging UDFs and stored procedures Here is
a link to that tip:

David Morris

>>> 01/30/02 07:05PM >>>
Hi Buck,

I wrote a procedure called FMTBIGINT in an RPGLE service program named
FORMAT, compiled it, did the CREATE FUNCTION in SQL, then did a SELECT
try it out.  It didn't work the first time, so I wanted to debug it.
the interactive job where I'd done the STRSQL, I did STRDBG
SRVPGM(FORMAT), then ran the SELECT, and got lots of "Breakpoint
received in
secondary thread." messages.

At that point I checked the archives and found that a year and a week
you'd run into the same problem, and I'd responded with some stuff from
Info Center, and you replied you needed to do more research, and you'd
the results. I didn't see any further posts on it, so my additional
consisted of hitting the F1 key on one of those "Breakpoint
messages and reading the following:

Recovery  . . . :   To debug this breakpoint, this job must be debugged
  servicing job. First, do End Debug (ENDDBG) in this job. Next, do
  Service Job (STRSRVJOB JOB(352249/CC_PGMPCD/PDOWS2)). Finally, do
  Debug (STRDBG) from where the STRSRVJOB was done.

I copied & pasted the STRSRVJOB stuff into a second interactive job on
same box, followed by the STRDBG UPDPROD(*YES) SRVPGM(FORMAT), went
back to
the first session and restarted the SELECT, and voila! my 2nd
session stopped at the breakpoint I'd set.  A lot simpler than the
Center made it sound.

Hope that helps anyone trying to do the same.

Peter Dow

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-2022 by 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.