How to join(merge) two sequential files?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Amar_nath
Participant
Posts: 56
Joined: Tue Apr 18, 2006 5:03 am

How to join(merge) two sequential files?

Post by Amar_nath »

hi ,
i am new user of DS

I want to merge 2 seq files on a primary key

1st seq file contains - EmpName,EmpNo,Dept
2nd seq file contains - EmpNo,BasicSal

so i want a target file which contains-EmpName,EmpNo,Dept,BasicSal

reply soon.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

This is precisely the function of the Merge stage in server jobs. It can perform inner joins as well as outer joins.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Amar_nath
Participant
Posts: 56
Joined: Tue Apr 18, 2006 5:03 am

Post by Amar_nath »

ray.wurlod wrote:Welcome aboard. :D

This is precisely the function of the Merge stage in server jobs. It can perform inner joins as well as outer joins.
I have tried for that but its not permitting me to link Seq file directly to Merge(in Palette->Merge)

it gives error "The destination stage does not support stram input links"

is Hashed file required inbetween?
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

Amar_nath wrote:
ray.wurlod wrote:Welcome aboard. :D

This is precisely the function of the Merge stage in server jobs. It can perform inner joins as well as outer joins.
I have tried for that but its not permitting me to link Seq file directly to Merge(in Palette->Merge)

it gives error "The destination stage does not support stram input links"

is Hashed file required inbetween?
No it does not work that way.
It does not accept input link. It can have output link only.

Merge Stage ---> Sequential File Stage

Did you check Merge stage properties through which you can specify 2 filenames to be merged and also their respective column definitions. You can specify type of join like inner join, complete set etc..

I suggest you read the manual for better understanding.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You name both input files within the Stage properties. The Merge stage only has an output link.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply