Author |
Message
|
Boolean |
Posted: Thu Sep 14, 2006 4:17 am Post subject: TDS message set in WMB 5 |
|
|
Acolyte
Joined: 05 Jun 2003 Posts: 56 Location: Sweden
|
1. I'm reading the following message (Input node):
INVEXP ... and more data
INLEXP ... and more data
INLEXP ... and more data
INLEXP ... and more data
INVEXP ... and more data
INLEXP ... and more data
INLEXP ... and more data
INVSUM ... and more data
INVSUM ... and more data
and it parses ok - Input message tree looks fine i Debug mode!
2. Then I'm trying to create this out message
Header| ...| and more data delimited
INVEXP| ...| and more data delimited
INLEXP| ...| and more data delimited
INLEXP| ...| and more data delimited
INLEXP| ...| and more data delimited
INVEXP| ...| and more data delimited
INLEXP| ...| and more data delimited
INLEXP| ...| and more data delimited
INVSUM| ...| and more data delimited
INVSUM| ...| and more data delimited
Trailer| ...| and more data delimited
3. Using a MRM TDS msgset (all elements delimited), the OutputRoot MRM looks perfect in Debug mode when leaving the Compute node.
4. But when the message is written on the Output node, the second INVEXP record is missing. No error message - parses fine but without this row.
My thought was to set the set as "Unordered", but this is not allowed.
Surely the output layout must be able to create? _________________ / Boolean |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 14, 2006 4:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
So is it only the INVEXP record, or is it all of the records between the second INVEXP and the Trailer that are missing?
Either way, it's a matter of how you indicated repeating structures I think. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Sep 14, 2006 4:42 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Jeff's right. Check that your message model accurately describes the sequence of repeating fields in your message. If you temporarily enable content validation in the Compute node or the output node it will automatically trap any mismatches for you. |
|
Back to top |
|
 |
Boolean |
Posted: Thu Sep 14, 2006 5:35 am Post subject: |
|
|
Acolyte
Joined: 05 Jun 2003 Posts: 56 Location: Sweden
|
Yes, it's only the INVEXP record (the second one) that's missing.
I will try the "Validation test" - will come back _________________ / Boolean |
|
Back to top |
|
 |
Boolean |
Posted: Thu Sep 14, 2006 5:58 am Post subject: |
|
|
Acolyte
Joined: 05 Jun 2003 Posts: 56 Location: Sweden
|
Tried the Validation option with "Content and Value", but no difference and no error message.
Message is happily parsed without the second "INVEXP" row. _________________ / Boolean |
|
Back to top |
|
 |
Boolean |
Posted: Thu Sep 14, 2006 6:35 am Post subject: |
|
|
Acolyte
Joined: 05 Jun 2003 Posts: 56 Location: Sweden
|
Invoice:
Min occurs=0
Max occurs= 1
Invoice Anonymous:
Composition=sequence, Closed
All Elements Delimited
Delimiter = <CR><LF>
INVEXP:
Min occurs=1
Max occurs= -1
Repeating Element Delimiter = <CR><LF>
INVEXP Anonymous:
All Elements Delimited
Delimiter = |
The same goes for the elements INLEXP and INVSUM _________________ / Boolean |
|
Back to top |
|
 |
Vijji |
Posted: Thu Sep 14, 2006 6:37 am Post subject: |
|
|
 Voyager
Joined: 30 Aug 2005 Posts: 83
|
Did u set maxocuurence in Msgset? |
|
Back to top |
|
 |
Boolean |
Posted: Thu Sep 14, 2006 6:42 am Post subject: |
|
|
Acolyte
Joined: 05 Jun 2003 Posts: 56 Location: Sweden
|
Invoice:
Min occurs=0
Max occurs= 1
INVEXP:
Min occurs=1
Max occurs= -1
And the same for the other elements _________________ / Boolean |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 14, 2006 7:06 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Boolean wrote: |
Invoice Anonymous:
Composition=sequence, |
That means that any and all occurances of INVEXP must be before any and all occurances of INVLEXP, and any and all occurances of INVLEXP must occur before any and all occurances of INVSUM.
Change it to a choice or an unordered set. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Boolean |
Posted: Thu Sep 14, 2006 7:10 am Post subject: |
|
|
Acolyte
Joined: 05 Jun 2003 Posts: 56 Location: Sweden
|
Already tried unorderedSet and:
Composition must not be 'unorderedSet' when Data Element Separation is "AllElementsDelimited". Physical format 'TDS'
Will try 'choice' ASAP _________________ / Boolean |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 14, 2006 7:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You probably don't need "all elements delimited".
Choice will have implications on your code if your data isn't tagged or the parser can't otherwise resolve the choice for you.
You may want to put another group under Invoice, that contains your current group and can repeat. This would allow your original data.
I forget if you can set repeat options on occurances of types rather than elements. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Boolean |
Posted: Thu Sep 14, 2006 7:20 am Post subject: |
|
|
Acolyte
Joined: 05 Jun 2003 Posts: 56 Location: Sweden
|
Ok, so the preferrable solution would be to go for 'unordered' and remove "all elements delimited"?
I'm not using tags for the outgoing data, so it gave me:
Choice Element has more than one option defined.
An element with a complex type that has composition 'Choice' can only have one option defined in the message.
Correct the defined message to accept the outgoing bitstream. _________________ / Boolean |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 14, 2006 7:23 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I guess the point is that your model should match your data, and right now it doesn't - right now your model is essentially A*B*C*, and you want it to be (A*B*C*)*. Or even (A|B|C)* _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Sep 14, 2006 7:51 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Assuming that your lines are terminated by a single carriage return, the model you want is along these lines ( not tested, I'm afraid)
Code: |
Invoice
**ANONYMOUS**
Local Group
Composition=Choice,
maxOccurs=-1
DES=Tagged Delimited,
Tag Data Separator='|'
Delimiter=<CR>
Group Terminator=<CR>
INVEXP Tag='INVEXP' Type=*ANONYMOUS**
**ANONYMOUS**
Composition=Sequence
DES=All Elements Delimited
Delimiter=|
INLEXP Tag='INLEXP'
**ANONYMOUS**
Composition=Sequence
DES=All Elements Delimited
Delimiter=|
INVSUM Tag='INVSUM'
**ANONYMOUS**
Composition=Sequence
DES=All Elements Delimited
Delimiter=|
|
Quote: |
I'm not using tags for the outgoing data, so it gave me:
Choice Element has more than one option defined. |
What is the BIP number on that message? I don't recognise it. |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Sep 14, 2006 3:09 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Kimbert -
If Boolean uses a Choice type without using a tag or some other means for the parser to resolve the choice, then Boolean will have to adjust the ESQL code to force the resolution of the choice.
If, instead, Boolean puts another group (instance of a type in the message, rather than instance of an element of a type) around the set, and makes that group an unlimited repeat, then the code remains the same, but the model starts accepting an IVEXP after an INLEXP. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|