Page 1 of 1

create multiple files in parallel based on values

Posted: Mon Jan 03, 2011 9:57 pm
by dsrules
Need an approach to implement multiple files creation based on values which are dynamic. The value is used in SELECT clause of a query. Have to create all the files parallel.
Used loop activity stage which is consuming more time because it takes one value at a time and runs the query.

Example:

SELECT NAME, DESIGNATION from EMPLOYEE where DEPT_NM=#JP_DEPT_NM#

Here Department name is dynamic means they might need information for 5 departments on a given day or sometimes 50 departments on a given day


Appreciate your help.

Thanks

Posted: Mon Jan 03, 2011 10:19 pm
by chulett
Create a work table, load the list of values there, join with your table.

Posted: Tue Jan 04, 2011 6:22 am
by srinivas.g
Or you can use Allow multiple instance option

Create multiple files parallel by using dynamic values

Posted: Tue Jan 04, 2011 10:48 am
by dsrules
chulett wrote:Create a work table, load the list of values there, join with your table. ...
Could you please elaborate the logic.

Thanks.

create multiple files in parallel based on values

Posted: Tue Jan 04, 2011 10:50 am
by dsrules
srinivas.g wrote:Or you can use Allow multiple instance option
Could you please explain me how to run the multiple instance sequence for the dynamic list of values.

Thanks

Re: Create multiple files parallel by using dynamic values

Posted: Tue Jan 04, 2011 11:17 am
by chulett
dsrules wrote:
chulett wrote:Create a work table, load the list of values there, join with your table. ...
Could you please elaborate the logic.
Which part is unclear? Your particular work table would have a single column in it for DEPT_NM which you would load with whatever values needed to be used to constrain the current run. Then modify your SQL to be something like:

SELECT NAME, DESIGNATION from EMPLOYEE, WORK where EMPLOYEE.DEPT_NM = WORK.DEPT_NM

Re: Create multiple files parallel by using dynamic values

Posted: Tue Jan 04, 2011 11:49 am
by dsrules
chulett wrote:
dsrules wrote:
chulett wrote:Create a work table, load the list of values there, join with your table. ...
Could you please elaborate the logic.
Which part is unclear? Your p ...
Not able to view the whole message. How do I join to work table and populate files which is not clear to me.
Example: My list file has 50 dept. numbers and I shall create 50 files in parallel.

Thanks