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: 74
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: 1696
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 File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Asynchronous CICS Processing Question moezbud CICS 1 Mon Mar 06, 2017 6:13 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am


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