Page 1 of 1

Pattern matching

Posted: Tue Jun 12, 2007 9:38 am
by kumars
Hi,
Can anyone please tell me how can i use pattern matching operator in the filename?
More specifically: my source file contains 8 digits, so in the sequential file stage i want to give a pattern where if there are 8 digits in the file name then only the file would be processed otherwise not.
If anyone has the solution please mail me at kumar.satish@polaris.co.in
Thanks in advance.


Regards,
Satish Kumar

Posted: Tue Jun 12, 2007 10:01 am
by Ed Purcell
Do you mean the File Pattern option of an input sequential stage in Enterprise Edition?

Posted: Tue Jun 12, 2007 12:26 pm
by Minhajuddin
There is an option in Datastage Enterprise Edition where you can get the source data by using pattern matching in the file name.

Posted: Tue Jun 12, 2007 3:06 pm
by ray.wurlod
The job type is marked as server edition and it's posted in the server forum. On that basis, let's offer a server solution.

It can't conveniently be done in the job itself.

In the job sequence that controls the job use a Nested Condition activity to determine whether the file name (job parameter?) includes eight numeric digits (for example #Filename# Matches "0X8N0X") to trigger an output that runs the job via a downstream Job activity.

For eight non-contiguous digits Oconv(#Filename#,"MCN") Matches "8N" would be a suitable expression.