Page 1 of 1

Retrieve nth char from a string

Posted: Wed Nov 18, 2009 8:32 am
by abhilashnair
What is the DataStage String function equivalent to cut -c command we have in unix. my requirement is extracting chaacter from position 11 to 20 from a string of 25 characters. I have to do it thru DS only

Posted: Wed Nov 18, 2009 9:20 am
by ArndW

Code: Select all

In.Mystring[11,10]

Posted: Wed Nov 18, 2009 10:09 am
by chulett
Right, those square brackets are the substring operators and they take start position and length as parameters.