is datastage accept negative numbers

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
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

is datastage accept negative numbers

Post by pavankatra »

Hi,
I have stagvariable like
If (IsValid("int32", Sv9Digits) And(IsValid("string", Sv10thChar))) Then ((9*0)- (DSLink3.ISBN [1,1])) Else 'N'.


First charecter is 1 then it will return -1.My doubt is whether datastage accept the negative numbers or not.

Can anyone please help me on this.

Thanks In Advance.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

int32 is a signed 32-bit integer.

If you don't want signed numbers, uint32 is an unsigned 32-bit integer.

Not sure what you're trying to accomplish. (9 * 0) will always be 0. IsValid() always returns true for "string" (unless the value is null).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, of course it will accept negative numbers. I must admit, however, your derivation confuses me... you multiple 9 by 0? To what end, just to get a zero? And then set a variable to either an 'N' or a negative number? Kind of an odd way to flip the sign, if you ask me. :?

Other than that, why the doubt? What issue are you having with this?
-craig

"You can never have too many knives" -- Logan Nine Fingers
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

chulett wrote:Yes, of course it will accept negative numbers. I must admit, however, your derivation confuses me... you multiple 9 by 0? To what end, just to get a zero? And then set a variable to either an 'N' or a negative number? Kind of an odd way to flip the sign, if you ask me. :?

Other than that, why the doubt? What issue are you having with this?
Thanks for your reply.

Actually i want to do that formula upto 9 position ike
((9*0)- (DSLink3.ISBN [1,1]))
((9*1)- (DSLink3.ISBN [2,2]))
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

And? :?
-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 »

Can you please give us some examples of input and expected output?

Are you trying to generate a check digit on an International Standard Book Number?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

ray.wurlod wrote:Can you please give us some examples of input and expected output?

Are you trying to generate a check digit on an International Standard Book Number?
i am sorry my logic was wrong.Just now we changed the logic,i didn't get negative value.Anyway thanks for your support.really sorry ...

THanks
Post Reply