String extraction

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
senthilmp
Participant
Posts: 85
Joined: Mon Sep 22, 2008 6:11 am

String extraction

Post by senthilmp »

Hi,

I dont want to extract the last four characters of the string. But the no of characters in the string is not know. Can you let me know what function should i use to achieve this?

For Eg: in the following string:
FY200901041233501234 - the last 4 character i.e 1234 shoud be eliminated and the result should be FY20090104123350

Thanks in Advance.
Senthil MP
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Code: Select all

YourField[4]
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sorry, don't want. :oops:

Code: Select all

YourField[1,Len(YourField)-4]
-craig

"You can never have too many knives" -- Logan Nine Fingers
senthilmp
Participant
Posts: 85
Joined: Mon Sep 22, 2008 6:11 am

Post by senthilmp »

Thanks
Post Reply