how to search a string and concatenate

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
venugopal81
Participant
Posts: 49
Joined: Sat Mar 26, 2005 12:19 am

how to search a string and concatenate

Post by venugopal81 »

Hi all,

I need search for the character '-' in the last position if the last position is '-' then move it to the front of the number.

Thanks & regards
venu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The substring operator will work from the 'end' of a string.

Code: Select all

YourField[1]
Tells it to take the first character from the end of the string. You could then compare that to "-" and if equal, swap it around to the front.

Hmm... you posted in the Server forum but marked your job type as Parallel. Are you looking for a Server or PX answer?
-craig

"You can never have too many knives" -- Logan Nine Fingers
venugopal81
Participant
Posts: 49
Joined: Sat Mar 26, 2005 12:19 am

How to swap it arount to the front

Post by venugopal81 »

swap it around to the front.
Please tell me how to swap the values in datastage.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
the answer depends on the server or parallel question Craig asked you.
So which job type do you need it for?
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
venugopal81
Participant
Posts: 49
Joined: Sat Mar 26, 2005 12:19 am

Parallel job

Post by venugopal81 »

parallel Job
roy wrote:Hi,
the answer depends on the server or parallel question Craig asked you.
So which job type do you need it for?
venugopal81
Participant
Posts: 49
Joined: Sat Mar 26, 2005 12:19 am

Parallel job

Post by venugopal81 »

parallel Job
roy wrote:Hi,
the answer depends on the server or parallel question Craig asked you.
So which job type do you need it for?
Post Reply