Hi,
I want the logic to convert the alphabets a-z to the character 'C', numbers 0-1 to character 'N' and special characters to 'S' character to find the data type distribution. can you please let me know how can we convert the character in IBM datastage 9.1.
Example
value: Hello World 2017 !!!
converted value: CCCCC CCCCC NNNN SSS
how to convert A-Z to C character and 0-9 to N character
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 1
- Joined: Sun Mar 26, 2017 9:57 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use Information Analyzer, which does all this out of the box.
Otherwise use a long Convert() function (with 52 'C' and ten 'N' characters) in DataStage (in Transformer stage).
(Technically you don't have to convert the first "C" character. But I believe that the intent is clearer if you do.)
Otherwise use a long Convert() function (with 52 'C' and ten 'N' characters) in DataStage (in Transformer stage).
Code: Select all
Convert('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghiklmnopqrstuvwxyz0123456789', 'CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCNNNNNNNNNN', InLink.TheString)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.