seq. file stage: 2 inputs append to existing file

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
luca
Participant
Posts: 81
Joined: Wed May 14, 2003 11:34 pm

seq. file stage: 2 inputs append to existing file

Post by luca »

Hi,
I would like to have confirmation that it is possible to have 2 inputs into the same sequential file, using append to existing update action. I want to check that DS is going to manage well with the 2 inputs links and that all the rows coming from link 1 and link 2 will be found in the resulting file.
I remember having such a problem once (not all records were foud in a sequential file having 2 inputs links).
Thanks
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Hi Luca,

it is not datastage which can't it is the operating system. So use 2 files and join them in the after-stage-routine.

Wolfgang Huerter
=====================
Cologne, Germany
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A sequential file is just that. Whatever arrives is appended to it. To avoid interleaved lines the operating system prohibits two writers at the same time.
There is no way that a single Sequential File stage can bypass this operating system restriction.

You might experiment with the two input links writing to separate named pipes and a separate, "server", job read from these pipes and append whatever it found to the target file.

However, as Wolfgang says, and has been said many times on this and other lists, the easiest way is to write to two separate files then, once all processing is finished, to put them together, for example:
cat file2 >> file1

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Post Reply