IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need Best solution


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vvgoud

New User


Joined: 16 Aug 2007
Posts: 27
Location: Hyderabad

PostPosted: Fri Sep 19, 2008 11:20 am
Reply with quote

Hi,

I would like to know which is more faster whether the DB2 query or cobol program.

I have two DB2 tables one is Keyword table and another is Description table, Reading the record in keyword table and searching the keyword in Description table.

I have 1000 records in first table and 1 million records is second table.

searching criteria is 1000 * 10,00,000 = 100,00,00,000

Suppose If we do it through cobol program means reading all the keywords into array and using INSPECT or SEARCH identifying the keword in Description table.

which is more faster whether the DB2 query or cobol program.

I will appreciate your response and let me know any clarification.

Thanks,
Venkat.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 19, 2008 11:58 am
Reply with quote

Hello,

This appears to be the same topic as your other topic. You have still not answered the questions asked there. That topic has been locked, so you can continue here.

As i mentioned, there you need a much more clear definition of the requirement before you look at how to code a solution - regardless of whether you try with only db2/sql or actually use come probram code.

Quote:
Suppose If we do it through cobol program means reading all the keywords into array and using INSPECT or SEARCH identifying the keword in Description table.
Not necessarily. Again, the rules need to be understood before development begins.

For some other similar (i believe) requirements, i parsed out all of the "real" words in what you call the desccription and placed them in a qsam file that had each "word", the length of that word, and the id where it was located. Small words (less than 3 characters) were discarded as well as things like "'s" and "(s)" and other non-key components (like money and dates). What i used for rules may not be the same as you would need.

These words were technical components of some chemical manufacturing specifications and the goal was to identify all of the formula that used certain components. When the process was complete, there was a new table that contained all of the words used in all of the specifications and which specifications the word(s) were used in. Every word that was retained, was kept with the direct info to the database entries that contained it.

To meet a requirement that we "track" certain groups of materials (equivalenmt to your keywords), I also created a sequential file of the keywords and their length.

By sorting both files by the "word", i was able to match them with very little code and very little system resource usage. There were no big arrays or INSPECT/SEARCH processing.

As i asked in the other topic, how will you use the counts once they have been determined?
Back to top
View user's profile Send private message
vvgoud

New User


Joined: 16 Aug 2007
Posts: 27
Location: Hyderabad

PostPosted: Sat Sep 20, 2008 4:20 am
Reply with quote

Hi

I got my answer I wil go with the cobol program , thanks so much your response.

Have a nice weekend.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts SDSF like solution in EJES (store com... All Other Mainframe Topics 4
No new posts A very ingenious mainframe automation... CA Products 1
No new posts Typing the CENT sign ยข on mainframe,... All Other Mainframe Topics 2
No new posts Any single step solution possible? SYNCSORT 7
This topic is locked: you cannot edit posts or make replies. CICS availability solution CICS 17
Search our Forums:

Back to Top