DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
kiranredz



Group memberships:
Premium Members

Joined: 06 Aug 2008
Posts: 21
Location: United States
Points: 213

Post Posted: Fri Aug 28, 2009 1:49 am Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: TX
OS: Windows
Additional info: Need to process files with a particular naming format
Hi,

I was looking for an option to read the file for processing, from an input directory based on a particular naming convention.
For Ex: my filenames are expected in the format - ABC_YYYYMMDD.txt.

Just like data stage PX, Is there an option to pick the files starting with ABC_*.txt?

I tries using * wildcard to match the inputfile name. I dint get the expected result.

Please let me know whether I can achieve this in TX.

Thanks

_________________
Kiran
rep
Participant



Joined: 19 Jun 2007
Posts: 82
Location: New York City
Points: 1097

Post Posted: Wed Sep 02, 2009 11:42 am Reply with quote    Back to top    

You should have no problems using wildcards; I haven't. I usually use something like;

*.txt

I haven't had the need to use ?. I have had wierd error messages on "shadow file rename failure" inregards to using wildcards, but after messing around with it, trying different things, I would always get it to work. It's been a while, but I think if you use wildcards in the input filename, you may have to use them in the output filename, but I could be wrong.

So if my input filename is;

*.txt

my output may have to be;

*.output.txt

for example. Try different things.


There's a lot of info in the documentation, such as;

General rules for using wildcards in adapter names: v

Directories cannot have wildcard notation in their names. v
A database source name cannot contain wildcard notation. v
If wildcards are used as sources or targets, at least one source trigger must have a wildcard. v
Question marks cannot be used in target file names. v
Multiple wildcards can be used in a source trigger name of a map, as long as there are no other source triggers. v
If more than one source file name contains a wildcard, that wildcard must be the same wildcard. v
Sources that are not event triggers and target names can contain at most one asterisk.

Wildcards v Can be used within a file name v
Cannot be used for directory names v
Can be used in Audit Log file names providing the input that is a trigger has the necessary wildcards to resolve the name for resource coordination


Multiple wildcards in a source name

If a source name has multiple wildcards and the target name has a single asterisk wildcard, the target name asterisk is replaced with the first wildcard value, next wildcard value, and any characters that exist between the wildcards. For example, with a source name of *a???b.c and a target name of *.d , if the source file name instance is: xyazzzb.c the target name assigned by the Launcher is: xyazzz.d
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours