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 » ESQL: access value in a choice group with unknown sequence

Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4  Next
 ESQL: access value in a choice group with unknown sequence « View previous topic :: View next topic » 
Author Message
ottfried11
PostPosted: Mon Aug 12, 2013 7:03 am    Post subject: Reply with quote

Apprentice

Joined: 28 Jun 2013
Posts: 29

I'm not asking anybody to debug my message flow. I've been at it for the past 5 hours and just wanted to make sure that I didn't miss anything.
I coudn't find any examples in the reference manuals or any other code using two asterisks.

There is a messageStream at the indicated location. There is no namespace. Threr is also an elmenet as the first child of the source element.
Back to top
View user's profile Send private message
dogorsy
PostPosted: Mon Aug 12, 2013 7:17 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

ottfried11 wrote:
I'm not asking anybody to debug my message flow. I've been at it for the past 5 hours and just wanted to make sure that I didn't miss anything.
I coudn't find any examples in the reference manuals or any other code using two asterisks.

There is a messageStream at the indicated location. There is no namespace. Threr is also an elmenet as the first child of the source element.


Don't say it does not work then. First assumption should be: "my code is wrong"
I have shown you how to debug before.
Inside the for loop, you start with

Code:
DECLARE cursor reference to source;
CREATE LASTCHILD OF OutputRoot.XMLNSC.Test name 'cursor' value FIELDNAME(cursor);
DECLARE cursor1 reference to source.*;
CREATE LASTCHILD OF OutputRoot.XMLNSC.Test name 'cursor1' value FIELDNAME(cursor1);
etc

Back to top
View user's profile Send private message
ottfried11
PostPosted: Mon Aug 12, 2013 7:23 am    Post subject: Reply with quote

Apprentice

Joined: 28 Jun 2013
Posts: 29

Quote:


refInSWEIOBody
choiceElement
structure14332
structureHeader
structureLength:CHARACTER:00117
reserviert:CHARACTER:24000
structureBody14332
messageStream
KTHANHandelsplatz
domain:CHARACTER:7
length:CHARACTER:003
value:CHARACTER:EUL
KTHANHandels_Waehrung
domain:CHARACTER:8
length:CHARACTER:003
value:CHARACTER:EUR
KTHANKZ_Covered
domain:CHARACTER:6
length:CHARACTER:001
value:CHARACTER:0


The second asterisk can't work. There is a Header AND a body structure. the messageStream in in the body structure
Back to top
View user's profile Send private message
dogorsy
PostPosted: Mon Aug 12, 2013 7:49 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

ottfried11 wrote:
Quote:


refInSWEIOBody
choiceElement
structure14332
structureHeader
structureLength:CHARACTER:00117
reserviert:CHARACTER:24000
structureBody14332
messageStream
KTHANHandelsplatz
domain:CHARACTER:7
length:CHARACTER:003
value:CHARACTER:EUL
KTHANHandels_Waehrung
domain:CHARACTER:8
length:CHARACTER:003
value:CHARACTER:EUR
KTHANKZ_Covered
domain:CHARACTER:6
length:CHARACTER:001
value:CHARACTER:0


The second asterisk can't work. There is a Header AND a body structure. the messageStream in in the body structure


I repeat, just in case you did not understand the first time,
Don't say it does not work then. First assumption should be: "my code is wrong"

So, debug your code and stop saying it does not work @!34$$@#
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 12, 2013 8:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

mqjeff wrote:
It wouldn't work if there wasn't an element named messageStream at the indicated location.


ottfried11 wrote:
There is a messageStream at the indicated location


ottfried11 wrote:
The second asterisk can't work. There is a Header AND a body structure. the messageStream in in the body structure


So it's not at the indicated location.
Back to top
View user's profile Send private message
ottfried11
PostPosted: Mon Aug 12, 2013 8:10 am    Post subject: Reply with quote

Apprentice

Joined: 28 Jun 2013
Posts: 29

I did debug it. The second asterisk points to the structureHeader. The messageStream is at the indicated location:
Code:

source.structure14332.structureBody14332.messageStream.


The structure14332 has a header and a body element. I was just wondering how the asterisk should know which one to take.[/quote]
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Mon Aug 12, 2013 8:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

ottfried11 wrote:
I was just wondering how the asterisk should know which one to take.


The asterisk is not animated so it does not know anything. The ESQL interpreter uses the asterisk as a search pattern, and the first match to that search pattern is returned.

Which one? The first one.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
ottfried11
PostPosted: Mon Aug 12, 2013 8:26 am    Post subject: Reply with quote

Apprentice

Joined: 28 Jun 2013
Posts: 29

Thanks for the info. That explains why I get the wrong result. I moved the ref to last and then first child. works fine now. Thanks an no bad feelings
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 12, 2013 8:32 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

ottfried11 wrote:
Thanks for the info. That explains why I get the wrong result. I moved the ref to last and then first child. works fine now. Thanks an no bad feelings


Yes, "*.*" means "first child, regardless of it's name and namespace". You had the header as the first child, not the container for the messageStream element.

You could have done "*.*[>]" to mean "last child, regardless of it's name or namespace".
Back to top
View user's profile Send private message
dogorsy
PostPosted: Mon Aug 12, 2013 8:37 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

ottfried11 wrote:
Thanks for the info. That explains why I get the wrong result. I moved the ref to last and then first child. works fine now. Thanks an no bad feelings


I think you are in need of education , or failing that, READ THE BOOKS.
People will give you answers, but will not write your code. It is up to you to write it, debug it and make it work. And as I said before, and I repeat, the first assumption should be: "my code is wrong"
Back to top
View user's profile Send private message
dogorsy
PostPosted: Mon Aug 12, 2013 8:39 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

You could have done "*.*[<]"
is the last
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 12, 2013 8:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

dogorsy wrote:
You could have done "*.*[<]"
is the last


Did I get that backwards?
Back to top
View user's profile Send private message
dogorsy
PostPosted: Mon Aug 12, 2013 8:45 am    Post subject: Reply with quote

Knight

Joined: 13 Mar 2013
Posts: 553
Location: Home Office

mqjeff wrote:
dogorsy wrote:
You could have done "*.*[<]"
is the last


Did I get that backwards?


yes, not to worry, I've done it many times. It was far easier when you could use *[last], but it was deprecated... sigh...
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 12, 2013 8:47 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

dogorsy wrote:
mqjeff wrote:
dogorsy wrote:
You could have done "*.*[<]"
is the last


Did I get that backwards?


yes, not to worry, I've done it many times. It was far easier when you could use *[last], but it was deprecated... sigh...


Guess I'm not perfect. Who knew?
Back to top
View user's profile Send private message
ottfried11
PostPosted: Mon Aug 12, 2013 8:47 am    Post subject: Reply with quote

Apprentice

Joined: 28 Jun 2013
Posts: 29

Nobody is forcing you to answer my questions. I did mention that the WMB is completely new for me. I did get a few days of education, but not in ESQL. As in every language, its learning by doing and by asking questions.

Still, thanks for the help.[/quote]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4  Next Page 3 of 4

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL: access value in a choice group with unknown sequence
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.