Read more than 1 sequential 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
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Read more than 1 sequential file

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

/dev/null
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply