Page 1 of 1

Read more than 1 sequential file

Posted: Tue Oct 28, 2008 7:26 pm
by SURA
Hi

Can any one suggest which will be the best way to read more than one sequential file? I have 4 files with different name, but with same metadata. Let me know how to read all these files in a time

Regards
Ram

Posted: Tue Oct 28, 2008 8:36 pm
by ray.wurlod
Use a Sequential File stage with a Filter command that turns all four files into a single bytestream, for example cat file1 file2 file3 file4

Posted: Tue Oct 28, 2008 8:45 pm
by SURA
ray.wurlod wrote:Use a Sequential File stage with a Filter command that turns all four files into a single bytestream, for example cat file1 file2 file3 file4 ...
Hi Ray

In that case what should i need to give in the File name ?

Regards
Ram

Posted: Tue Oct 28, 2008 10:36 pm
by chulett
/dev/null

Posted: Wed Oct 29, 2008 8:53 am
by ray.wurlod
Anything. The File Name is ignored when a Filter command is used; stdout of the command is read by the stage. The fact that the File Name field has to be populated is merely annoying.

Posted: Wed Oct 29, 2008 9:09 am
by chulett
No, it's not ignored. You can, for example, put "fred" for the filename and simply "cat" for the filter and it will combine the two and "cat fred" automatically. That's why I tend to put "/dev/null" for the filename when its included in the filter command as it makes it more obvious that it's not used and it doesn't seem to get in the way of things.