Page 1 of 1

seq. file stage: 2 inputs append to existing file

Posted: Thu Jul 17, 2003 3:32 am
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

Posted: Thu Jul 17, 2003 3:54 am
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

Posted: Thu Jul 17, 2003 6:29 pm
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