0

My requrirement is all about find DML operations separately like (select,Insert,update and Delete) of table in members of PDS .The PDS dataset have nearly 19150 module out of that only 6850 module use DB2 statement and remaining belongs to either Report or Ims Module.

A = OUTTRAP('VAR.')                       
"LISTDS '"DSN"' MEMBERS"                  
B = OUTTRAP('OFF')  

I have developed which scan all the members in PDS and store it in stem variable then based on User input for members qualifier it will search from list of modules one by one in stem varible to find whether given DML operation perform for table found.

But it would nearly take 18 mins to get result from list of members 19150. Only 6850 modules are DB2 members.is there way to fliter out remaining members while store in stem variable itself?

Please give all suggestions to get this ??

user1776796
  • 29
  • 1
  • 1
  • 2
  • I am assuming Cobol, so why not Query DB2??? DB2 holds usage information from the DB2 bind. Also if you can get a PC db2 JDBC driver you can use something like squirrel http://squirrel-sql.sourceforge.net/. It has a DB2 plugin that does things like this – Bruce Martin Nov 22 '13 at 07:50
  • Rexx Panel get the input from user and read the all PDS members then read one by one member to found the table name which user gave.how to eliminate the Non-DB2 memebers without reading the members inside? all related to mainframe technology. – user1776796 Nov 22 '13 at 09:48
  • Are your 19,000 members programs? Look up the documentation of LISTDS. How would you expect it, a general tool, to filter for "the member that I want based on the content somewhere inside the member, with multiple values and multiple locations"? @cschneid has a very neat solution for you, and yes, you can do it all from Rexx. If you don't have access to the database/table, arrange to have it unloaded as a sequential dataset and process that. If you can only do it from the program source (because no bind), put up with 18 minutes or do it in batch. – Bill Woodger Nov 22 '13 at 13:48

1 Answers1

1

As @Bruce Martin indicates, this information is available in DB2 itself. Try reading the SYSIBM.SYSPACKSTMT DB2 catalog table. The STATEMENT column holds the SQL for the package, the NAME column very likely corresponds to a member in the PDS you're trying to parse.

cschneid
  • 10,237
  • 1
  • 28
  • 39
  • Nice idea, but you should also tell the OP how to cast the STATEMENT column from Bit Data into EBCDIC so it can actually be read (assuming that this is what will be scanned for table names etc). – NealB Nov 22 '13 at 18:48