Page 1 of 1

Regarding Sequential file

Posted: Fri Dec 30, 2005 12:03 am
by shyju
Hi All,

Can I have a sequential file whose input is from 3 different sources and the output of the sequential file pointing to a single file ?
For example the input has three different links and the output being a single file

Thanks,
Shyju.

Posted: Fri Dec 30, 2005 12:32 am
by kumar_s
Hi,
No Sequential file can have only one input link at the max.
But let us know what is that you exactly whan. Is it you want to merge all the file together or concatinate?

-Kumar

Posted: Fri Dec 30, 2005 2:09 am
by MaheshKumar Sugunaraj
Hi Shyju,

As Kumar stated earlier u can only one Input link from the Seq Stage,

If you have teh same meta data and u have source data coming form different sources on to common location of the same type you could use Folder Stage, Where u need to set some parameters this will take the multiple I/P files processe and send to one input file or You could concatenate the files before the process starts and run the job.


Hope the above helps.

Advance New Year wishes. :wink:

With Regards
Mahesh

Posted: Sun Jan 01, 2006 9:02 am
by kcbland
The Stage icon allows multiple input and output links, but each link has its own filename associated to it.

To have multiple links combine their owns in to a single stream, use the link collector stage.

If you attempt to have multiple output links write to the same file simultaneously, you will end up with corrupt output data because all operating systems write data in blocks, there is no concept of a "row".

Posted: Sun Jan 01, 2006 1:54 pm
by roy
Hi,
Can't help thinking what happened to the filter command option?!
you can use it to say have a:
/usr/bin/cat #PATH#/file*
as the data source instead of the conventional file name.

IHTH,

Posted: Sun Jan 01, 2006 2:39 pm
by chulett
Well... other than the fact that that's for reading and the thread is about writing... and 'cat' doesn't work in the Filter like that... great answer! :wink: :lol:

Posted: Mon Jan 02, 2006 12:16 am
by roy
Craig,
I stand corrected, by answering to fast an answer with to short a description.
I ment you can write to 3 files (not always you can use link colector) if you want to avoid syncronising your 3 writes.
Then concatenate the files using a command stage or reading the 3 files on your next job with the filter command.
I guess I was thinking to far ahead :oops:

Then again the poster never gave info regarding what they want to do with the target file.

I don't know what crystal ball I was looking at while answering ;)
I guess the poster might reply, so I can mark that ball as dammaged or extra-ordiner.

P.S.
If you read it again (witout the example) you might understand why I understood it differently and assumed a filter might be handy.

Posted: Mon Jan 02, 2006 8:19 am
by chulett
No problem... just a little friendly harrassment. :wink:

And you would think the Filter command could handle a 'cat' like you showed but for some reason it doesn't. At least it wouldn't work like that for me on HP-UX 11.11 and DS 7.0.1. :cry: