View previous topic :: View next topic |
Author |
Message |
luckystarlak Beginner
Joined: 12 Jan 2007 Posts: 4 Topics: 1
|
Posted: Fri Feb 06, 2009 6:04 am Post subject: SQL list in a Program |
|
|
Hi,
Other than writing some kind of tool in rexx etc., is there any way that we can get a list of SQL query used in a particular cobol program.
Thanks
laks. |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Fri Feb 06, 2009 11:11 am Post subject: |
|
|
Parse the DBRM _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
haatvedt Beginner
Joined: 14 Nov 2003 Posts: 66 Topics: 0 Location: St Cloud, Minnesota USA
|
Posted: Sat Feb 14, 2009 2:51 pm Post subject: |
|
|
I've written a small program that i use as a poor man's db2 precompiler on my pc...
i download source code, run it through a program which comments out all the DB2 statements and then i can compile the output on my pc cobol compiler (just for syntax checking). then i have another program that uncomments all of the statements commented out by the "precompiler" program.
the "precompiler" program could be modified pretty easily to only write out the lines which contain SQL...
let me know via email if you're interested, I could send you the source code. _________________ Chuck Haatvedt
email --> clastnameatcharterdotnet
(replace lastname, at, dot with appropriate
characters) |
|
Back to top |
|
 |
CZerfas Intermediate
Joined: 31 Jan 2003 Posts: 211 Topics: 8
|
Posted: Mon Feb 16, 2009 4:48 am Post subject: |
|
|
You could, of course, access the DB2 catalog (if the DBRM has already been bound) and look into SYSIBM.SYSSTMT for that particular package.
If you have access to BMC catalog manager, you can use the DESCRIBE command for that package and get all informations about that package, including the SQL statements (and their access paths).
regards
Christian |
|
Back to top |
|
 |
|
|