To get table name and query mode of access in a cobol prog.



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

To get table name and query mode of access in a cobol prog.

Postby Kiru_J » Sun Mar 17, 2013 7:39 pm

Is there anyway to get tables accessed and their corresponding query mode of access in a cobol program? Either through REXX or any DB2 catalog tables have this information? Need help...
Kiru_J
 
Posts: 4
Joined: Sun Mar 17, 2013 7:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: To get table name and query mode of access in a cobol pr

Postby Akatsukami » Sun Mar 17, 2013 8:47 pm

It's unclear what you're asking. Could this task be accomplished by reading the source and looking at the SQL? If so, and if you have a small number of source modules to go through, you will probably be best doing it by hand; a Rexx script that read the DBRMLIB and the SYSPACKAGES table could undoubtedly be written, but it would take more effort than going through the source.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: To get table name and query mode of access in a cobol pr

Postby Kiru_J » Sat Mar 23, 2013 10:59 am

Yes i do agree,it would take much effort. But i just need something which would give me a the list of tables accessed in all the cobol programs in endevor along with the mode of access to tables.
Kiru_J
 
Posts: 4
Joined: Sun Mar 17, 2013 7:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: To get table name and query mode of access in a cobol pr

Postby pmartyn » Fri Mar 29, 2013 12:03 am

Kiru
You can always let DB2 do the work for you. Bind the package with EXPLAIN(YES) and it will take all the information and place it in the plan table for you to view. Everything it touches and the details regarding access, etc
More Info;
Specify the EXPLAIN(YES) option when you bind the plan or package. With EXPLAIN(YES), only a small amount of additional processing is required to insert the results in a plan table. The same processing for access path selection is performed, regardless of whether you use EXPLAIN(YES) or EXPLAIN (NO).

Here is the link for your reference
http://pic.dhe.ibm.com/infocenter/dzich ... ininfo.htm

PM
pmartyn
 
Posts: 42
Joined: Thu Feb 28, 2013 7:11 pm
Has thanked: 5 times
Been thanked: 3 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post