Author |
Message
|
ottfried11 |
Posted: Mon Aug 12, 2013 7:03 am Post subject: |
|
|
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 |
|
 |
dogorsy |
Posted: Mon Aug 12, 2013 7:17 am Post subject: |
|
|
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 |
|
 |
ottfried11 |
Posted: Mon Aug 12, 2013 7:23 am Post subject: |
|
|
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 |
|
 |
dogorsy |
Posted: Mon Aug 12, 2013 7:49 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Aug 12, 2013 8:01 am Post subject: |
|
|
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 |
|
 |
ottfried11 |
Posted: Mon Aug 12, 2013 8:10 am Post subject: |
|
|
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 |
|
 |
lancelotlinc |
Posted: Mon Aug 12, 2013 8:22 am Post subject: |
|
|
 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 |
|
 |
ottfried11 |
Posted: Mon Aug 12, 2013 8:26 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Aug 12, 2013 8:32 am Post subject: |
|
|
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 |
|
 |
dogorsy |
Posted: Mon Aug 12, 2013 8:37 am Post subject: |
|
|
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 |
|
 |
dogorsy |
Posted: Mon Aug 12, 2013 8:39 am Post subject: |
|
|
Knight
Joined: 13 Mar 2013 Posts: 553 Location: Home Office
|
You could have done "*.*[<]"
is the last |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Aug 12, 2013 8:40 am Post subject: |
|
|
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 |
|
 |
dogorsy |
Posted: Mon Aug 12, 2013 8:45 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Aug 12, 2013 8:47 am Post subject: |
|
|
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 |
|
 |
ottfried11 |
Posted: Mon Aug 12, 2013 8:47 am Post subject: |
|
|
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 |
|
 |
|