extract function in transformer stage string functions
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 103
- Joined: Wed Jul 06, 2005 12:29 am
extract function in transformer stage string functions
Can anyone help me out how does an extract function in server transformer stage work.I have tried with different options being passed for example Extract("dsxchange",1,2,2),it runs the job properly but returns null value.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Extract() function works with dynamic arrays to extract an element therefrom. Your function (Extract("dsxchange",1,2,2)) attempts to get the second sub-value from the second value of the multi-valued first field of a dynamic array but your first argument is not a dynamic array, merely a scalar string. In such cases, the Extract() function will always return "". Indeed, all string functions in DataStage BASIC return "" if reference is made to a non-existent position.
Please specify in English what you want to accomplish, and we will be able to advise more accurately the function that you should be using.
Please specify in English what you want to accomplish, and we will be able to advise more accurately the function that you should be using.
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.
-
- Participant
- Posts: 103
- Joined: Wed Jul 06, 2005 12:29 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: