Pattern matching

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
kumars
Participant
Posts: 1
Joined: Wed May 30, 2007 1:50 am

Pattern matching

Post 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
Kumar
Ed Purcell
Premium Member
Premium Member
Posts: 23
Joined: Fri Mar 28, 2003 5:41 pm
Location: USA

Post by Ed Purcell »

Do you mean the File Pattern option of an input sequential stage in Enterprise Edition?
EPCCTX
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post 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.
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
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