Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Query on Parallel processing of Stored Procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rexx77

New User


Joined: 14 Apr 2008
Posts: 73
Location: Mysore

PostPosted: Thu Aug 14, 2014 12:41 pm    Post subject: Query on Parallel processing of Stored Procedure
Reply with quote

Hi All,

I am working on a requirement where in I might get more number of records (Say 500+), for which I need to check the back end db2 table and formulate the results.

For the same record, I need to refer another table for the filter conditions, meaning, using which I need to query the master database.

Now, I cannot go for sequential processing where main module takes first record, queries another table and refer the master table. This could result in more execution time.

In Hadoop, we have concept of assigning the same work to multiple nodes, and each work independently, master program combines the result.

In the same way, can I have a master SP which calls the same common module multiple times with different input parameters, with out waiting for the return code of the each call. May be we can have 5 to 10 calls to the same SP , wait for each to complete and take another batch and issue the next set of calls.

Can you please let me know if my understanding will work? or do you have any other better way of doing this piece of requirement ?

many thanks for your time in this.
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1625
Location: NY,USA

PostPosted: Thu Aug 14, 2014 8:44 pm    Post subject:
Reply with quote

Yes Very well you can do it,
1) Declare your input parms to SP as Varchar of whatever max size you want and then populate this varchar like each record one after another and then give a call to SP. Now SP can unstring this to an array for each record or a key of that record and then process it till it reads all the varchar.

2)Another way is use a temp table and populate that with all the records that you have (500+) and then call the SP and in SP make a join with this temp table and process it.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us