× 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.



Hi, Steve:
**
Try:
CRTSQLRPG ... OPTION(*LSTDBG)

Each job has its own QTEMP. so when you compile the source from QTEMP, with *SRCDBG, you must have the source available in the same named source physical file for the debugger to access it. If that source file is in QTEMP, it can only be accessed from the same job. *:-o*

You could also just change *SRCDBG to *LSTDBG in that CRTRPGPGM command in your CL program.

Option *LSTDBG embeds the listing in the compiled *PGM object, so it is always available for the debugger.

Hope that helps,

Mark S. Waterbury

> On 11/30/2011 10:19 AM, Steve Richter wrote:
I want to use SQL in an RPG400 program. And I want to be able to use
STRDBG OPMSRC(*YES) to debug the SQLRPG program same as I debug an RPG
program. Problem is, STRDBG works on the compiled SQLRPG program only from
the job that compiled the program. Using STRDBG OPMSRC(*YES) from another
job returns the message "OPM source cannot be accessed".

How to enable the debugger to always be able to access the OPM source?

Here are the commands used to compile the SQLRPG code. Since there is no
debug option on CRTSQLRPG, the trick is to run CRTSQLRPG with *NOGEN. This
creates the RPG source code for the SQLRPG program in QTEMP/QSQLTEMP. Then
CRTRPGPGM from the code in qtemp/qsqltemp with option(*SRCDBG). After
running those two commands I run STRDBG OPMSRC(*YES) and the source
debugger opens up. But only from the job that ran CRTSQLRPG and CRTRPGPGM.

...(snip)...

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.