Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging SQLCBL on AS/400 1

Status
Not open for further replies.

mikrom

Programmer
Mar 27, 2002
2,997
SK
I need to debug an COBOL program with embedded SQL on AS/400, but it don't work neither with STRISDB nor with STRDBG.

Who can give me an advice, how to compile the program and how to run the debugger?

Thanks in advance.
 
I don´t know with those debuggers, but with Extermin8 we need to compile the program interactively, not in batch, as a temporary source file will be created in qtemp.

Try it like that an see if there is any difference, and also go and have a look at the manuals to see if you can find any help (you should have the IBM manuals available to you on CD, and they do offer search capabilities).
 
Thank you for the tip with the QTEMP library.
So the debuggable SQLCBL program can be created in 2 steps (it concerns OPM COBOL not ILE):

1. SQL-precompilation without COBOL compilation, which creates the COBOL program in library QTEMP and file QSQLTEMP

2. COBOL-compilation of the source in QTEMP/QSQLTEMP with the debugging option *SRCDBG.

In the practice, when I need to compile an SQLCBL program myprog (which resides in mylib/mysrcfile) to the library mylib I do this with the following 2 commands:

CRTSQLCBL PGM(mylib/myprog) SRCFILE(mylib/mysrcfile)
OPTION(*APOSTSQL *APOST *NOSRC *NOGEN)

CRTCBLPGM PGM(mylib/myprog) SRCFILE(QTEMP/QSQLTEMP)
OPTION(*SRC *APOST *SRCDBG)

Now myprog can be debugged with Interactive Source Debugger (STRISDB)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top