Concatenating Two datasets

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Raamc
Premium Member
Premium Member
Posts: 87
Joined: Mon Aug 20, 2007 9:08 am

Concatenating Two datasets

Post by Raamc »

Hi Friends,

In my job,i need to concatenate two datasets into a single dataset.I know that for this we can use funnel stage but the problem is my two input datasets are in different formats(Having different fields and different lengths) so funnel wil not work in this case.

Is there any best method is there to do this concatenation in Datastage Job? :!:

Thanks in Advance

Thanks ,
Raamc
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

If they are different formats, then you would need to write it to a flat file and pass an os level cat command.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Raamc
Premium Member
Premium Member
Posts: 87
Joined: Mon Aug 20, 2007 9:08 am

Post by Raamc »

Is there any specific stage to execute CAT command from Datastage job.I need to use the final created file(After Concatenating) for further processing in the same job.
Abburi
Participant
Posts: 31
Joined: Tue May 29, 2007 12:38 pm

Post by Abburi »

Raamc wrote:Is there any specific stage to execute CAT command from Datastage job.I need to use the final created file(After Concatenating) for further processing in the same job.
You can execute CAT command in the Execute Command Activity.
Regards,
Abburi
Raamc
Premium Member
Premium Member
Posts: 87
Joined: Mon Aug 20, 2007 9:08 am

Post by Raamc »

EXECUTE COMMAND Activity is at sequence level but i want to concatenate datasets at Job level.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

After job subroutine. But keep in mind these datasets need to be exported to a flat file before you can pass an os level cat on it.
I am not sure if any orch utility exists to cat datasets. I am not at a px site currently.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can not do what you seek to do, without forcing the format (record schema) to be that of the target Data Set. Once you have done that, you can use a Funnel stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
renaudfa
Participant
Posts: 3
Joined: Wed Dec 13, 2006 10:23 am

Post by renaudfa »

Could you add 2 transformers ?
1 concatenate all fields of dataset 1 into 1 single field varchar(xxxx)
the other does the same for dataset 2
and then funnel both streams.
dsdev_123
Participant
Posts: 25
Joined: Tue Oct 09, 2007 9:13 pm

Post by dsdev_123 »

use 2 column export stages for 2 datasets which you want to concatenate and club them together in funnel stage.that might work...
Post Reply