Join two sequential files in to one file
Moderators: chulett, rschirm, roy
Join two sequential files in to one file
I have 2 sequential files each file has 100 records and I am writing it to a sequential file.This file will have 200 records.
Seq file 1 has records Col1 col2 col3 ........col n
10 .... .... ......
10 .... .... ......
10 .... .... ......
10 .... .... ......
Seq file2 has records Col1 col2 col3 ........col n
20 .... .... ......
20 .... .... ......
20 .... .... ......
20 .... .... ......
Now I want the output for Target as Col1 col2 col3 ........col n
10
20
10
20
10
How can I achieve this in PX.
Seq file 1 has records Col1 col2 col3 ........col n
10 .... .... ......
10 .... .... ......
10 .... .... ......
10 .... .... ......
Seq file2 has records Col1 col2 col3 ........col n
20 .... .... ......
20 .... .... ......
20 .... .... ......
20 .... .... ......
Now I want the output for Target as Col1 col2 col3 ........col n
10
20
10
20
10
How can I achieve this in PX.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It's not clear from your description. Do you want to select rows alternately from each of the two source files? Are there any other constraints that you haven't included? Are the source files guaranteed to have the same number of rows as the other?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Yes I want to select rows alternately from each of the two source files. there are no constraints included and the source files guaranteed to have the same number of rows as the other.The two sources have same number of records.I want to collect one record from each of the file alternately like the Round robin.I know that I can achieve this in server job using the Link collector stage.But not sure how to achieve this in parallel jobs.
Yes I want to select rows alternately from each of the two source files. there are no constraints included and the source files guaranteed to have the same number of rows as the other.The two sources have same number of records.I want to collect one record from each of the file alternately like the Round robin.I know that I can achieve this in server job using the Link collector stage.But not sure how to achieve this in parallel jobs.
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
You can use the Funnel stage in Parallel jobs to achieve this.
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
Try changing the type to Continuous Funnel. This may give you the desired output.
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>