Retrieve nth char from a string

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
abhilashnair
Participant
Posts: 284
Joined: Fri Oct 13, 2006 4:31 am

Retrieve nth char from a string

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Code: Select all

In.Mystring[11,10]
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, those square brackets are the substring operators and they take start position and length as parameters.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply