Shift one byte to right

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

Shift one byte to right

Post by consulting »

Hi
My reqriment is at present i am having 24 byte column with 24 zero
(000000000000000000000000) like this after doing calculation i have to put the calculated value in the first byte and to truncate the last 0.

like this if i run the job every month the last byte should be truncate and new value will be printed in the first byte
balaji
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And the 'calculated value' will always be a single digit?
-craig

"You can never have too many knives" -- Logan Nine Fingers
consulting
Participant
Posts: 50
Joined: Fri Dec 21, 2007 3:24 am

Post by consulting »

yes
balaji
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

For e.g. If your column name is Z,

CalculatedValue : Z[1,23]
Kandy
_________________
Try and Try again…You will succeed atlast!!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Or if the length of the target is variable:

Code: Select all

CalculatedValue : Left(InLink.Z, Len(InLink.Z) - 1)
-craig

"You can never have too many knives" -- Logan Nine Fingers
consulting
Participant
Posts: 50
Joined: Fri Dec 21, 2007 3:24 am

Post by consulting »

another reqriment is i have to count in first 6 byte there are how many value greater than 1
balaji
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Hey, come on. That is totally not the original question. Have you wasted our time here? It's a new question: please begin a new thread for it.
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