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



Santosh,

I stole this post from the iSeries Network forum at:

http://www.iseriesnetwork.com/Forums/Search_Results.cfm?CFApp=19#Message6879
8

---------------------------------------------------------------------
Date: May 02, 2001 07:45 AM
Author: Richard Silvers (Richard.Silvers@bcbsnc.com)
Subject: Debugging an OPM SQLCBL or SQLRPG Program with ILE debugger.

To all,

In the NEWS/400, January 2000 Tech Corner it states:

Q: I want to debug a program of type SQLCBL. I don't know
which precompiler option to use when compiling this program
with the CRTSQLCBL command to enable debugging. When I
specified the precompiler options *SOURCE and *SRC, I
received the error "Program not compiled with correct
compiler options" when I tried debugging the program with
the STRDBG command. Also, the error message suggests
compiling the program with the *SRCDBG option. But *SRCDBG
isn't a precompiler option. Can you help?

A: This question is specifically directed to Cobol but
applies to RPG as well. Although the ILE precompilers let
you specify DBGVIEW(*SOURCE), the OPM precompilers have no
similar capability. However, you can create an SQLCBL or
SQLRPG program object that is debuggable.
This is possible because the SQL precompiler generates
a "pure" (i.e., PDM-type CBL or RPG) Cobol or RPG
source in a source physical file called QSQLTEMP in
library QTEMP.

I don't know if there has been an update to this but there
is an option on CRTSQLCBL and CRTSQLRPG that allows you to
use the ILE debugger for SQL programs.

Compile option *LSTDBG will enable a debug listing view and
can be stepped thru while in ILE debug.

You can use the following way:

1.CRTSQLCBL PGM(mylib/mypgm) COMMIT(*NONE) OPTION(*APOST
*APOSTSQL *LSTDBG)
2.STRDBG PGM(mypgm) UPDPROD(*YES) OPMSRC(*YES)
3.Press F10
4.CALL PGM(mypgm) PARM('0')

You should now be in the *LISTING view and can STEP thru the program with
F10.
All vars passed between your program
and SQL can be displayed with F11.

Thanks,
Rick
---------------------------------------------------------------------

Hope this helps.

Terry

> -----Original Message-----
> From: santoshp@lot.tatasteel.com [mailto:santoshp@lot.tatasteel.com]
> Sent: Friday, July 26, 2002 10:36 PM
> To: cobol400-l@midrange.com
> Subject: interative debugging for SQLCBL program
>
> A few days back I came across a command here which was STRISDB.
>
> For using this , the source had to be compiled with *SRCDBG option.
>
> This works fine with CLP sources. But for SQLCBL programs, the compile
> option doesnt give *SRCDBG option. It does give *LSTDBG
> option but STRISDB
> doesnt work then.
>
> Is there no interactive debugging of a SQLCBL program ? Will
> I have to be
> contended by writing DISPLAY statements or using STRDBG with ADDBKP ?
>
> Plz help...
> Santosh.
>


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.