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 » TDS message set in WMB 5

Post new topic  Reply to topic Goto page 1, 2  Next
 TDS message set in WMB 5 « View previous topic :: View next topic » 
Author Message
Boolean
PostPosted: Thu Sep 14, 2006 4:17 am    Post subject: TDS message set in WMB 5 Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 14, 2006 4:27 am    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Thu Sep 14, 2006 4:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Boolean
PostPosted: Thu Sep 14, 2006 5:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Boolean
PostPosted: Thu Sep 14, 2006 5:58 am    Post subject: Reply with quote

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
View user's profile Send private message
Boolean
PostPosted: Thu Sep 14, 2006 6:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Vijji
PostPosted: Thu Sep 14, 2006 6:37 am    Post subject: Reply with quote

Voyager

Joined: 30 Aug 2005
Posts: 83

Did u set maxocuurence in Msgset?
Back to top
View user's profile Send private message
Boolean
PostPosted: Thu Sep 14, 2006 6:42 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 14, 2006 7:06 am    Post subject: Reply with quote

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
View user's profile Send private message
Boolean
PostPosted: Thu Sep 14, 2006 7:10 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 14, 2006 7:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Boolean
PostPosted: Thu Sep 14, 2006 7:20 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 14, 2006 7:23 am    Post subject: Reply with quote

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
View user's profile Send private message
kimbert
PostPosted: Thu Sep 14, 2006 7:51 am    Post subject: Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Thu Sep 14, 2006 3:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » TDS message set in WMB 5
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.