Reading multiple input files using external source stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Abhijeet
Participant
Posts: 20
Joined: Wed Jul 27, 2005 1:00 am

Reading multiple input files using external source stage

Post by Abhijeet »

Hi,

I have to read N input files all with the same schema.Their complete path along with the filenames are stored in file A. Now i have to concatenate all these files to create one input file.

Right now I have a job which reads the file A from a external source stage using the unix command

"cat A | xargs zcat -f"

And then links the output of the stage to a sequential file.

My question is , is there a better approach to handle the above scenario?

Thanks
~Abhi
sanjay
Premium Member
Premium Member
Posts: 203
Joined: Fri Apr 23, 2004 2:22 am

Re: Reading multiple input files using external source stage

Post by sanjay »

Hi

u can use fileset .

Thanks
Sanjay
Abhijeet wrote:Hi,

I have to read N input files all with the same schema.Their complete path along with the filenames are stored in file A. Now i have to concatenate all these files to create one input file.

Right now I have a job which reads the file A from a external source stage using the unix command

"cat A | xargs zcat -f"

And then links the output of the stage to a sequential file.

My question is , is there a better approach to handle the above scenario?

Thanks
~Abhi
Abhijeet
Participant
Posts: 20
Joined: Wed Jul 27, 2005 1:00 am

Post by Abhijeet »

File set cannot read file names from a sequential file

Do you mean creating a .fs file{which will need some scripting} and then read the file using fileset stage ?
sanjay
Premium Member
Premium Member
Posts: 203
Joined: Fri Apr 23, 2004 2:22 am

Post by sanjay »

use file pattern option of sequential file stage and load all the file in fileset.

Thanks
Sanjay

Abhijeet wrote:File set cannot read file names from a sequential file

Do you mean creating a .fs file{which will need some scripting} and then read the file using fileset stage ?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Could you generate the stream of data using something like cat `cat FileA`?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply