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 » Graphical mapping node

Post new topic  Reply to topic
 Graphical mapping node « View previous topic :: View next topic » 
Author Message
Sam Uppu
PostPosted: Fri Jun 14, 2013 1:02 pm    Post subject: Graphical mapping node Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

Hi All,

I am using WMB V8's Graphical mapping node to transform XML to COBOL.
On my COBOL copybook, we have 4 groups(A, B, C ,D) of elements. When i do mapping, i see only two group(A, D) of elements in the response. The two missing groups have "occurs depending on clause". I mapped using the for-each function on graphical map.

I don't understand what the issue is, could not all elements in output field.

Can you guys pls help me.

Thanks
Sam
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Jun 15, 2013 4:10 am    Post subject: Reply with quote

Grand High Poobah

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

In your map did you populate correctly the depending on field?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Sat Jun 15, 2013 12:00 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
When i do mapping, i see only two group(A, D) of elements in the response
Put a Trace node before and after the map. The problem might be with the parsing of the message, not with the mapping. Either way, the Mapping node has no knowledge of the COBOL 'occurs depending on' setting, so that is not the issue.
Back to top
View user's profile Send private message
Sam Uppu
PostPosted: Mon Jun 17, 2013 5:57 am    Post subject: Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

When i look at the trace, i dont see the B and C group in the trace. I see A and D mapping only. i am not sure if mapping node is ignoring the "occurs depending on" elements.
Back to top
View user's profile Send private message
Sam Uppu
PostPosted: Mon Jun 17, 2013 6:37 am    Post subject: Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

i am using For each function to map the elements on C and D.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Jun 17, 2013 7:44 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Sam,

If I understand you correctly, the fields do not exist in the message tree at all. My guess is that your message model is incorrect. If you post the Trace node output then we may be able to help.
Back to top
View user's profile Send private message
Sam Uppu
PostPosted: Mon Jun 17, 2013 9:02 am    Post subject: Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

Hi guys,

I cleaned my workspace and did mapping again. I am able to see the groups populating now. Not sure wat was the issue earlier.

I have one more question :
how do we get the number of occurences of an element using mapping node?
I have to populate the number of occurences of XML element to a cobol field.
Do we have any function like cardinality in ESQL?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Jun 17, 2013 9:09 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

NEVER use "the number of occurrences" to loop over a message tree.

IN ESQL or otherwise.

YES, the v7 and v8 map nodes provide LOOP functions that let you iterate over the existing number of occurrences.
Back to top
View user's profile Send private message
Sam Uppu
PostPosted: Mon Jun 17, 2013 10:21 am    Post subject: Reply with quote

Yatiri

Joined: 11 Nov 2008
Posts: 610

Thanks mqjeff.

For looping thru the number of occurrences , i have used "For each" function.

I have a cobol elements ws-occurs which should be populated with the count of number of occurrences. I want to know if there is any function to calculate the number occurences of a field.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jun 18, 2013 3:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

I assume that you want to do this in the Mapping node. If you simply drag a line from the input array element to an integer element then the Mapping node should automatically create a transform that counts the number of array elements.

[edit]Actually it creates a ForEach loop by default. You can change that to fn:count(), which you will find under the 'Math functions' section.[/edit]
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 » Graphical 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.