ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Mapping node: CAST to INTEGER

Post new topic  Reply to topic
 Mapping node: CAST to INTEGER « View previous topic :: View next topic » 
Author Message
vanshulchawla_target
PostPosted: Mon Nov 15, 2010 1:30 am    Post subject: Mapping node: CAST to INTEGER Reply with quote

Apprentice

Joined: 19 May 2010
Posts: 25

Hi,

I am casting a string to decimal and in turn that decimal to integer in mapping node

So my input is "1.00" Casting to decimal will be 1.00 and in integer it will be 1

xs:integer(xs:decimal("1.00")

Its converting to decimal but not to integer in MB V 7.0.0.0
In MB 6.1.0.5 its working fine

Please help on what can be done?
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Nov 15, 2010 5:16 am    Post subject: Re: Mapping node: CAST to INTEGER Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

vanshulchawla_target wrote:
Its converting to decimal but not to integer in MB V 7.0.0.0
In MB 6.1.0.5 its working fine


So what happens in v6? Remains as a decimal? Turns into a character string? Breaks out of the back of the machine & flies off to start a little family of decimals on a roof somewhere?

More information, better advice. What error messages do you get? What have you already tried to resolve this? Have you taken a user trace? What are the differences between your v6 & v7 flows? Is it the same flow or the same code (i.e. is it a flow written & working under v6 converted to v7 or a v7 flow that contains the same code as a v6 flow)?

Most importantly why are you using WMBv7 with no maintenance applied? Why, in the face of this problem, was your first thought not to apply maintenance?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
vanshulchawla_target
PostPosted: Mon Nov 15, 2010 8:05 pm    Post subject: Reply with quote

Apprentice

Joined: 19 May 2010
Posts: 25

May be i was not clear enough

In MB V 6.1.0.5, we have a flow where we are using mapping node for transformation.We are converting a string("1.00") to integer.Its a written code which we are migrating to MB V 7.0.0.1
Its converting the string to decimal and then to integer.
So its like xs:integer(xs:decimal("1.00")

Now i have imported the same flows in MB V 7.0.0.1

There the string is getting converted to decimal but after that the xs:integer function is not converting it to integer

I tried xs:int and it works but we are not allowed to change the code and documentation in MB V 7 gives both the options as valid.

Is it that in MB V 7.0.0.1 , this function xs:integer is missed as xs :int works?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Nov 16, 2010 2:47 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What does it mean "is not converting it to integer"?

You mean "leaves the value as a decimal and does not throw an error"?

Or you mean "throws an error"? What error?

Also check that your Toolkit for 7 is as the most recent iFix and fixPack level.
Back to top
View user's profile Send private message
novato
PostPosted: Fri Apr 13, 2012 1:36 pm    Post subject: Reply with quote

Novice

Joined: 14 Mar 2012
Posts: 13

I am also trying to do a similar transformation in mapping node and facing the same issue.

What I am trying to do:
I am using Message broker toolkit version 7.0.0.3. A XML tag is coming in as String. I want to convert the string to a integer which does not have any decimal places. For example, value is coming in as 12.00 . I want to send just 12

Expression given in mapping nocde:
xs:integer(sourcepath)

Result:
I am getting the value as 12.00 only

Please let me know if some other steps need to be taken
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Apr 14, 2012 4:16 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

novato wrote:
Result:
I am getting the value as 12.00 only


Much the same advice as the OP; getting where? In the output? Where in the output? What format is the target output field? It can't be integer or the decimal places couldn't be held. The phrase "I am getting" conveys little to those of us who cannot see your set up.

Though I commend you on the detail you did provide; software levels and so forth. Thank you.

novato wrote:
Please let me know if some other steps need to be taken


If in doubt, take a user a trace.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Mapping node: CAST to INTEGER
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.