Reading multiple files from a sequential file 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
Hope
Participant
Posts: 97
Joined: Sun May 13, 2007 2:51 pm
Contact:

Reading multiple files from a sequential file stage

Post by Hope »

I am trying to read multiple files from a sequential file stage.If I try to read one file at one time I can view the data.But If I specify read method to Specific File(s) and read all the files then aso I can view the data for all the files but I find a special charater at the beginning of the file (ie the 1st record of the file has a special character )when I view the data .Do I need to specify any file delimiter if so what is the option?.
Please advice.

Thanks
Hope
Participant
Posts: 97
Joined: Sun May 13, 2007 2:51 pm
Contact:

Post by Hope »

The files names are all different so I am using specific files.

Please advice
sreddy
Participant
Posts: 144
Joined: Sun Oct 21, 2007 9:13 am

Re: Reading multiple files from a sequential file stage

Post by sreddy »

Hope

You are using MFile stage :?:


Hope wrote:I am trying to read multiple files from a sequential file stage.If I try to read one file at one time I can view the data.But If I specify read method to Specific File(s) and read all the files then aso I can view the data for all the files but I find a special charater at the beginning of the file (ie the 1st record of the file has a special character )when I view the data .Do I need to specify any file delimiter if so what is the option?.
Please advice.

Thanks
SReddy
dwpractices@gmail.com
Analyzing Performance
Hope
Participant
Posts: 97
Joined: Sun May 13, 2007 2:51 pm
Contact:

Post by Hope »

I am using Sequential file stage .This is a parallel job.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... you can't use a File Pattern, even one like '*' or '*.csv' to read them?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Hope
Participant
Posts: 97
Joined: Sun May 13, 2007 2:51 pm
Contact:

Post by Hope »

I am having 5 columns in all these files.In one of the file 2 columsn have no value.so I set the NULL FEILD VALUE for these columns as '' .And I am able to read these files.

Thanks for responding.
Raamc
Premium Member
Premium Member
Posts: 87
Joined: Mon Aug 20, 2007 9:08 am

Post by Raamc »

Why can't we use *. and *.csv formats in file pattern.

I have used the follwoing in my jobs.
SOURCE:
FILE PATTERN: #pSOURCE#/BRANCH_NUMBER/*.*

to read set of 10 text files and it has worked.
Thanks,
Raamc
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Depends what "the file names are all different" actually means. If they are sufficiently different that no suitable wildcard pattern can be found, then multiple File properties with a mode of Specific File is likely to be preferred.
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 »

Assuming they are all located in the same directory, no matter how 'sufficiently different' their filenames were, a suitable wildcard pattern could be "*" or "*.*", I would think. Unless there are other filenames that should not be picked up at the same time, of course.

I'm guessing that the multiple Specific File option is more about files in multiple locations or cherry-picking files out of the herd from the same location than just the fact that their names are all different.
-craig

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