Create multiple files without looping
Posted: Wed May 26, 2010 3:33 pm
Hello all
I have data like
col1 col2 col3
aaa 21 22
aaa 31 23
bbb 12 12
ccc 32 12
bbb 12 34
Now i have to generate separate files for each distinct value of col1.
In this case i will generate 3 files.
1st file will be like
aaa 21 22
aaa 31 23
2nd file will be like
bbb 12 12
bbb 12 34
3rd file will be like
ccc 32 12.
This task is easy if the distinct values in col1 are fixed. But in my case once i run the job, distinct values in col1 can be 12,20,3,4 .. i dont know.
Its all dynamic. Still we can do this using the looping activity in Datastage sequence. we can loop the job for each distinct value of col1. But i do not want to do using looping activity. I want to run the process once and multiple files should be generated each having one distinct value of col1.
Is this possible? Can we use any of the DataStage stages and implement this? Please reply.
I have data like
col1 col2 col3
aaa 21 22
aaa 31 23
bbb 12 12
ccc 32 12
bbb 12 34
Now i have to generate separate files for each distinct value of col1.
In this case i will generate 3 files.
1st file will be like
aaa 21 22
aaa 31 23
2nd file will be like
bbb 12 12
bbb 12 34
3rd file will be like
ccc 32 12.
This task is easy if the distinct values in col1 are fixed. But in my case once i run the job, distinct values in col1 can be 12,20,3,4 .. i dont know.
Its all dynamic. Still we can do this using the looping activity in Datastage sequence. we can loop the job for each distinct value of col1. But i do not want to do using looping activity. I want to run the process once and multiple files should be generated each having one distinct value of col1.
Is this possible? Can we use any of the DataStage stages and implement this? Please reply.