Decimal to integer
Moderators: chulett, rschirm, roy
Decimal to integer
Hi,
Iam using an stagevariabe as integer .ex total (variable)
Total(integer) = Total(integer)+Reclinenumber(decimal). I want this Reclinenumber to convert to integer.How to convert decimal to integer can I take it asinteger function to convert decimal to string. Please help me
Thanks
Somaraju
Iam using an stagevariabe as integer .ex total (variable)
Total(integer) = Total(integer)+Reclinenumber(decimal). I want this Reclinenumber to convert to integer.How to convert decimal to integer can I take it asinteger function to convert decimal to string. Please help me
Thanks
Somaraju
somaraju
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
AsInteger may generate warnings, because the potential exists for your decimal number to be too large to fit in an integer. If you can be 100% certain that this will never be the case, equip a message handler for this message in this job to demote the warning to informational.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No. DataStage will always generate the warning. Because you need the warning. If you want to you can create a message handler to demote the warning to an informational message. Search is your friend.
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.
Somu
The easiest way is to convert your decimal to integer use AsInteger
Total(integer) = Total(integer)+AsInteger(Reclinenumber(decimal)).
The easiest way is to convert your decimal to integer use AsInteger
Total(integer) = Total(integer)+AsInteger(Reclinenumber(decimal)).
Regards
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
Siva
Listening to the Learned
"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Charter Member
- Posts: 143
- Joined: Thu Nov 04, 2004 6:53 am
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Premium Member
- Posts: 353
- Joined: Wed Apr 06, 2005 8:45 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
(If (SrcColumn < 0) Then "-" Else "") : Fmt(Abs(SrcColumn), "R%" : (4 - (SrcColumn < 0)))
Code: Select all
If SrcColumn < 0 Then "-" : Fmt(Abs(SrcColumn), "R%3") Else Fmt(SrcColumn, "R%4")
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.