reading from folder stage

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
tostay2003
Participant
Posts: 97
Joined: Tue Feb 21, 2006 6:45 am

reading from folder stage

Post by tostay2003 »

Hi,


I have got a folder stage and say i just need to read two specific files i.e. file1.txt and file2.txt out of 100 files in that folder. How can I do that?


Regards
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Not possible unless you can guarantee that these are the only files in the directory.

Prefer a sequential file stage if the files have the same structure, or two separate data streams otherwise.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Or filter option, if the file name are in same pattern.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does the Folder stage have a filter option?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Prefer a sequential file stage if the files have the same structure - Got to see it now.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Ocean
Participant
Posts: 18
Joined: Tue Jul 18, 2006 1:51 am

Post by Ocean »

ray.wurlod wrote:Does the Folder stage have a filter option? ...
WildCard field in Output Properties page does the filter for source file. Can use File* to filter File1, File2....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Technically, 'filters' and 'wildcards' are not equivalent. However, wildcards can be used with more than just the splat - '*'. For example on UNIX:

Code: Select all

file[1-2].txt
Will get you just file1.txt and file2.txt out of the '100 files in that folder'. :wink:
-craig

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