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
is datastage accept negative numbers
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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).
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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. ![Confused :?](./images/smilies/icon_confused.gif)
Other than that, why the doubt? What issue are you having with this?
![Confused :?](./images/smilies/icon_confused.gif)
Other than that, why the doubt? What issue are you having with this?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
Thanks for your reply.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?
Actually i want to do that formula upto 9 position ike
((9*0)- (DSLink3.ISBN [1,1]))
((9*1)- (DSLink3.ISBN [2,2]))
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
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 ...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?
THanks