How to get the substring from the string in DS transformer
Moderators: chulett, rschirm, roy
How to get the substring from the string in DS transformer
Hi ,
I want extract substring ( e.g starting from 4th place to 10th place ) from a giving string of length 100.
e.g.
Given String:
STR= "abcd,ef,ghi,jkl,123,4rf,gfr,ser.........."
I want to extract "ef" from the above mentione given string.
I want to check the substr(6,7) ='ef'.
How would i do in the datastage transformer.
Can somebody help me out.
Thanks
I want extract substring ( e.g starting from 4th place to 10th place ) from a giving string of length 100.
e.g.
Given String:
STR= "abcd,ef,ghi,jkl,123,4rf,gfr,ser.........."
I want to extract "ef" from the above mentione given string.
I want to check the substr(6,7) ='ef'.
How would i do in the datastage transformer.
Can somebody help me out.
Thanks
Nirmal Sharma
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore
"abcd,ef,ghi,jkl,123,4rf,gfr,ser[6,2] = ef
Assuming data string is left justified, fetch 2 bytes from string position 6.
Assuming data string is left justified, fetch 2 bytes from string position 6.
Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.
By William A.Foster
By William A.Foster