substring in an variable string

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
nag0143
Premium Member
Premium Member
Posts: 159
Joined: Fri Nov 14, 2003 1:05 am

substring in an variable string

Post by nag0143 »

hi all,

hey i got a column (description) in my flat files.. in that variable column most of the columns have SSP.text1 hidden in the column (text1 might be any thing), i need to take only 3 char after that SSP.
help me with this.........
Peytot
Participant
Posts: 145
Joined: Wed Jun 04, 2003 7:56 am
Location: France

Post by Peytot »

In the Help, function substring\
MyString = Field("###DHHH#KK","#", 4) ;* returns "DHHH"

Pey
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Go to your online help from the Designer. Under the Index tab, type in "BASIC" and then select the "alphabetic list of" entry.

You'll see a list of all BASIC functions by alpha. But, more importantly, there is also a line that says "If you are unsure of the function or statement you need, see BASIC Tasks". From there you can drill down into sub-categories like "Substring Extraction and Formatting" which should help you do what you need to do.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

INDEX() to get the location of "SSP." then substringing to extract the particular characters you need. Try it yourself; come back if you're having difficulties.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply