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 » problem with mapping node

Post new topic  Reply to topic
 problem with mapping node « View previous topic :: View next topic » 
Author Message
DirtyHowi
PostPosted: Mon Feb 17, 2014 8:22 am    Post subject: problem with mapping node Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

we do this all the time, map an incoming message from our legacy cobol system to a .NET service, and it works every darn time...cept now.

Its failing with an esql error, i think its because the external service (provided by one of our partners) has a field in the data contract called password, now in .NET its not a big deal, but if that is some reserved function in ESQL it might be causing my issue. I know i had to rename the cobol service contract password field otherwise it would bomb immediatly.

Apologies i'm about as new to this as you can get and still be able to draw lines in the ID for MQ. I'm figuring it out slowly, but am still very unfamiliar with ESQL and most of the nodes.

TIA for any help you can provide
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 17, 2014 9:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

If a field name is a reserved word, put it in double quotes.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Gralgrathor
PostPosted: Mon Feb 17, 2014 10:45 am    Post subject: Re: problem with mapping node Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

DirtyHowi wrote:
map an incoming message

How? Mapping node? Compute?

DirtyHowi wrote:
Its failing with an esql error

Okay, so... which one? What does it say? What's the line of code it was executing when the exception occurred? That kind of info usually provides important clues...
Back to top
View user's profile Send private message Send e-mail
DirtyHowi
PostPosted: Mon Feb 17, 2014 11:04 am    Post subject: Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

turns out it has to do with the fact that there are only 3 types in cobol, character array, int and float (and even that last one is questionable).

we are passing a Y or an N to a boolean field on the other end, and the transform doesnt know how to handle that in the mapping node.

i'm trying to figure out if i need to write some custom esql or just beat my cobol guy about the head and neck area.
Back to top
View user's profile Send private message
Gralgrathor
PostPosted: Mon Feb 17, 2014 11:56 am    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

DirtyHowi wrote:
beat my cobol guy


Don't know how the Jedi around here feel about it, but it's my philosophy that when it comes to simple translation and routing questions, that's what WMB is for. It's usually more of a hassle to change the client applications than to write a few lines of extra ESQL code.
Back to top
View user's profile Send private message Send e-mail
JosephGramig
PostPosted: Mon Feb 17, 2014 12:41 pm    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

DirtyHowi wrote:

we are passing a Y or an N to a boolean field on the other end, and the transform doesnt know how to handle that in the mapping node.


Use a function in the map to test for "Y" and assign the result to the Boolean field?

You can do any thing in the Map node you can do in code (including code). I prefer code but some folks love the Map node or somehow think not writing code is more efficient.

imho I think it is easier to find/fix errors in code rather than a rats nest of mapping lines and functions.
Back to top
View user's profile Send private message AIM Address
DirtyHowi
PostPosted: Mon Feb 17, 2014 1:02 pm    Post subject: Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

well since this is new development, its not a problem to modify the copy book.

we have an understanding that everything comes through as strings and we translate it on our end, that way we can execute rest or xml services from cobol without a problem, this is an outside data contract.

simple solution was to make the copy book match the contract on the other end.

i have no compunction against writing code, rather do it there anyway, but the boss man say, gotta use the bus for this one.

its been enlightening to say the least. One of these day's i'll take that darned class i signed up for LOL.

Thanks for all your help. i may just whoop the cobol guy a bit (which is a laugh he's twice my size and i dont stand a chance, its all in good natured fun anyway)
Back to top
View user's profile Send private message
Gralgrathor
PostPosted: Mon Feb 17, 2014 1:46 pm    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

JosephGramig wrote:
I prefer code but some folks love the Map node or somehow think not writing code is more efficient


There are pros and cons to the mapping node.

Con: performance is piss poor compared to straight ESQL code (speaking from experience up to version WMB 7.X; still working on gaining experience beyond that).

Pro: like XSLT mappings, they're eminently maintainable. Simplest case: change your XSD, regenerate the map. ESQL code can be quite dense, and the logic can be difficult to figure out. Mappings much less so.

If performance is not a critical issue, or maintainability is more important, then I usually go with the mapping node. My philosophy is that even a complete retard should be able to maintain the code I write (for the same reason my code is usually more comment than actual code).
Back to top
View user's profile Send private message Send e-mail
Gralgrathor
PostPosted: Mon Feb 17, 2014 1:50 pm    Post subject: Reply with quote

Master

Joined: 23 Jul 2009
Posts: 297

DirtyHowi wrote:
simple solution was to make the copy book match the contract on the other end


Some times that is the easier solution. Especially if the contract was written especially for attaching to the WMB. But often enough, you're dealing with "legacy" software, or stuff that needs the same contract for other deals as well.

In the end, it's up to the "client" applications to specify their contracts. They may consult one another on the matter, but WMB developers should have no part in this. It's the job of the WMB developer to simply accept both contracts, and mediate between them.

Of course there's nothing wrong with providing some advice to the clients, especially if they're as human as humans are wont to be.
Back to top
View user's profile Send private message Send e-mail
JosephGramig
PostPosted: Tue Feb 18, 2014 6:12 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

Gralgrathor wrote:
Con: performance is piss poor compared to straight ESQL code (speaking from experience up to version WMB 7.X; still working on gaining experience beyond that).

Pro: like XSLT mappings, they're eminently maintainable. Simplest case: change your XSD, regenerate the map. ESQL code can be quite dense, and the logic can be difficult to figure out. Mappings much less so.


In WMB 8.0, the Map node was rewritten and suppose to be equivalent to ESQL nodes or JavaNodes. (I think they should change the name of the Compute node to EsqlNode for clarity...)

The Xsl node is and will always be the poorest performing transformation. If you have DataPower, you might consider using that for Xsl transformations as it is built for that (and a lot of other things).
Back to top
View user's profile Send private message AIM Address
DirtyHowi
PostPosted: Tue Feb 18, 2014 9:04 am    Post subject: Reply with quote

Novice

Joined: 17 Feb 2014
Posts: 22

JosephGramig wrote:
Gralgrathor wrote:
Con: performance is piss poor compared to straight ESQL code (speaking from experience up to version WMB 7.X; still working on gaining experience beyond that).

Pro: like XSLT mappings, they're eminently maintainable. Simplest case: change your XSD, regenerate the map. ESQL code can be quite dense, and the logic can be difficult to figure out. Mappings much less so.


In WMB 8.0, the Map node was rewritten and suppose to be equivalent to ESQL nodes or JavaNodes. (I think they should change the name of the Compute node to EsqlNode for clarity...)

The Xsl node is and will always be the poorest performing transformation. If you have DataPower, you might consider using that for Xsl transformations as it is built for that (and a lot of other things).


in 9 it works even better .

Thanks ya'll, understand i do 80% C# 15% MQ stuff, and 5% linux admin, being as small as we are we dont have the luxury of a single monolithic technology that requires our attention, it all does. For three guys we don't do to shabby.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Feb 18, 2014 1:28 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You should be able to change the model, without changing the copybook, to indicate that a 'Y' is a boolean true value.
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 » problem with mapping node
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.