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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debug a sql db2 code

Status
Not open for further replies.

julen

Programmer
Mar 26, 2006
27
0
0
ES
Hi everydoby!!

Is it possible with an application/programm, point the exact line of error in my code.



My sql db2 is for an as/400.

Any ideas of different applications/Programms??

Thanks.
 
Julen,
What language is your host for the SQL? I understand that you are running on an as/400 but what is the host language that the sql is embedded in? Cobol? PL/1? Or is it a stored procedure or similar?

Any way, you should be able to put debugging displays into the language in order to identify the exact point of error. Have a look at other programs at your site to see how they determine errors - usually this type of thing is pre-defined, and all you have to do is clone it for your program.

If needs be, post the code here if it is not too big.

Hope this helps.

Marc
 
Hi!

Thanks. My code is PL/SQL.


What I mean, is that if it is an application/program that in a real time can debug/trace the code.


Thanks again!!
 
Hi Julen,
I've not used the AS/400 so am not aware of the various real time debugging tools that might be available. I would be surprised if there aren't any. Ask around at your site, I would imagine that any available tools would be widely known.

If all else fails, are you able to add display messages to the PL/SQL along the lines of:

"About to execute 1st SQL statement"
"1st SQL statement executed sucessfully"
"About to execute 2nd SQL statement"
"2nd SQL statement failed - SQLCODE is " SQLCODE

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top