A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.
Moderators: chulett, rschirm, roy
-
Murali4u
- Participant
- Posts: 37
- Joined: Sun Feb 21, 2010 12:27 pm
Post
by Murali4u »
Dear all,
This question may be simple or known to all.
Can we have any function to check the format of the string like for eg
'XX XXX' * return true
aa abcd - returns true
aaa dcd - returns false
aaaaaaaaaaa - returns false
Please post me if you know any functions for this one.
Rockzz Tech
-
anbu
- Premium Member
![Premium Member Premium Member](./images/ranks/premium.gif)
- Posts: 596
- Joined: Sat Feb 18, 2006 2:25 am
- Location: india
Post
by anbu »
If want to match 2 alphabets followed by a space and 3 alphabets
If Fld Matches '2A 3A0X' Then 'Yes' Else 'No'
If want to match any 2 characters followed by a space and 3 chars
If Fld Matches '2X 3X0X' Then 'Yes' Else 'No'
You are the creator of your destiny - Swami Vivekananda
-
Murali4u
- Participant
- Posts: 37
- Joined: Sun Feb 21, 2010 12:27 pm
Post
by Murali4u »
Thank you very much. but one more question can we check a mixed format like aphabets and numerals:
eg:
[A-Z][0-9]
A9B
4BU
4B5
We can write the matches in a static way but the question is can we achieve it through dynamically.
Thanks in advance
Rockzz Tech
-
anbu
- Premium Member
![Premium Member Premium Member](./images/ranks/premium.gif)
- Posts: 596
- Joined: Sat Feb 18, 2006 2:25 am
- Location: india
Post
by anbu »
Use N to match a number
You can keep the format string as a job parameter.
You are the creator of your destiny - Swami Vivekananda
-
ray.wurlod
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
-
Contact:
Post
by ray.wurlod »
All possible match patterns are documented in the DataStage BASIC manual (and in UniVerse manuals).
They may even be documented somewhere on DSXchange.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.