Byte position move

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
consulting
Participant
Posts: 50
Joined: Fri Dec 21, 2007 3:24 am

Byte position move

Post by consulting »

I have month run jobs for my feild XXX for Jan month all the values will be like below while run for every month it should be
moved as below the value for feild XXX is from X
Month X XXX
Jan--0 00000000000
Feb--1 10000000000
Mar--2 21000000000
Apr--3 32100000000
May--4 43210000000
Jun--5 54321000000
Jul--6 65432100000
Aug--7 76543210000
Sep--8 87654321000
Oct--9 98765432100
Nov--1 19876543210
Dec--2 21987654321
balaji
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... concatenate the new value on the front of the current string and take the leftmost 11 characters. Left(X : XXX, 11) in other words.
-craig

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