Executing Mainframe DB2 Procedure multiple times
Posted: Sun Apr 27, 2008 7:06 pm
I have a stored procedure that will take 1 parameter and will return some output. I will have the parameter values in a text file. Below is an example:-
(1) My Data file FinancialYear.txt will have below values
1995
1996
1997
2001
2008
(2) DB2 Stored Procedure will accept above 4 character (year) as value
and will return Year and Total Revenue in Dollars.
WHAT I NEED
From a parallel job, I need to call Stored Procedure for every row, 5 times
in this case, passing 1995 till 2008 as inpit parameter and then store the values in a table.
(a) What Stage to use to call the stored procedure?
(b) How to design a paralle job something like a while loop that will start
with 1995 row and end with 2008 row, each time executing the stored
procedure?
(1) My Data file FinancialYear.txt will have below values
1995
1996
1997
2001
2008
(2) DB2 Stored Procedure will accept above 4 character (year) as value
and will return Year and Total Revenue in Dollars.
WHAT I NEED
From a parallel job, I need to call Stored Procedure for every row, 5 times
in this case, passing 1995 till 2008 as inpit parameter and then store the values in a table.
(a) What Stage to use to call the stored procedure?
(b) How to design a paralle job something like a while loop that will start
with 1995 row and end with 2008 row, each time executing the stored
procedure?