Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 78
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: 1831
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 Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts reg query on DYNALLOC feature raghuraman123 SYNCSORT 12 Wed Jan 10, 2018 2:42 pm
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts CICS web service from DB2 Triggers or... kiranprasad DB2 1 Wed Dec 20, 2017 11:10 am
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us