MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL list in a Program

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
luckystarlak
Beginner


Joined: 12 Jan 2007
Posts: 4
Topics: 1

PostPosted: Fri Feb 06, 2009 6:04 am    Post subject: SQL list in a Program Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Fri Feb 06, 2009 11:11 am    Post subject: Reply with quote

Parse the DBRM
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Sat Feb 14, 2009 2:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Mon Feb 16, 2009 4:48 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group