|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Data Element Seperation |
« View previous topic :: View next topic » |
Author |
Message
|
MSV |
Posted: Mon Oct 09, 2006 7:35 am Post subject: Data Element Seperation |
|
|
Acolyte
Joined: 11 Apr 2006 Posts: 59
|
Hi all,
COMPLEXTYPE1<CRLF>COMPLEXTYPE2
where COMPLEXTYPE1 refers to C1_Localelement1|C1_Localelement2|C1_Localelement3<CR><LF>Sub_complextype1
and COMPLEXTYPE2 refers to C2_Localelement1|C2_Localelement2
In full,
C1_Localelement1|C1_Localelement2|C1_Localelement3<CR><LF>Sub_complextype1<CR><LF>C2_Localelement1|C2_Localelement2
For the above mentioned TDS message,what would be the appropriate property to be set in the DataElementSeperation property of COMPLEXTYPE1 ?(as group indicators and terminators are not supported in this message)
I tried with several options.but, the message is not being properly parsed.
I want a hint from anyone of u. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Oct 09, 2006 7:45 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
C1_Localelement1|C1_Localelement2|C1_Localelement3<CR><LF>Sub_complextype1<CR><LF>C2_Localelement1|C2_Localelement2
For the above mentioned TDS message,what would be the appropriate property to be set in the DataElementSeperation property of COMPLEXTYPE1 ? |
It depends on whether C?_LocalElement1 have tags. It also depends on what 'Sub_complexType1' means. Sorry to be a pain, but the only way to clearly describe these problems is ( here we go again...)
- Provide an example input bitstream ( with any confidential data changed ).
- Provide an example of the message tree which you would like to get, complete with the contents of each element. |
|
Back to top |
|
 |
MSV |
Posted: Mon Oct 09, 2006 10:07 pm Post subject: |
|
|
Acolyte
Joined: 11 Apr 2006 Posts: 59
|
Quote: |
[quote="kimbert"]
- Provide an example input bitstream
- Provide an example of the message tree with the contents of each element. |
Thanks for ur reply Kimbert.
Example input
Header|1|1000
Item|1|10|L|1
ItemDataline|10
ItemTextLine|1
ItemTextId|1
ItemNumber|1
Trailer|1
example of the message tree
MRM
--Header --> CT
----Headername=Header
----Headernum=1
----Headercount=1000
----Item(one to many) --> CT
-------Itemname=Item
-------Itemnum=1
-------Itemcount=10
-------Itemtype=L
-------ItemDataLine(one to many) --> CT
----------Itemdatalinename=ItemDataLine
----------Itemdatalinenum=1
-------ItemTextline(one to many) --> CT
----------Itemtextlinename=ItemTextLine
----------Itemtextlinenum=1
----------Itemtextid(one to many) --> CT
--------------Itemtextidname=ItemTextId
--------------Itemtextidnum=1
-------ItemNumber(one to many) --> CT
----------Itemnumbername=ItemNumber
----------ItemnumberValue=1
--Trailer --> CT
----Trailername=Trailer
----Trailernumber=1
Note:CT represents Complex Type |
|
Back to top |
|
 |
kimbert |
Posted: Tue Oct 10, 2006 1:17 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Thanks for that - much clearer now. A few comments in your message structure:
- The message consists of lines of text
- Each line is a sequence of delimited fields ( delimiter is '|' ).
- The first 'field' on each line is a tag which identifies the line ( 'Header', 'Item' etc ).
That sounds quite simple, but you are actually doing some fairly complex processing when you organise this 'flat' structure into a message tree with four levels of nesting.
The message model needs to be like this. I haven't tested this, so treat everything with suspicion. Feel free to ask if anything is not clear.
In the following,
TDS = 'Tag Data Separator'
DES = 'Data Element Separation'.
The other abbreviations should be clear enough.
Code: |
Message [CT=MessageType DES='Tagged Delimited' Del='<CR>' GT=<CR> TDS='|']
Header [Tag='Header' CT=HeaderType] [DES='All Elements Delimited' Del='|']
HeaderNum
HeaderCount
Body [Tag='' CT=BodyType] [DES='Tagged Delimited' Del='<CR>' TDS='|']
Item [Tag='Item' minOccurs=1 maxOccurs=-1 CT=ItemType ] [DES='Tagged Delimited' Del='<CR>' TDS='|']
Itemnum
Itemcount
Itemtype
ItemDataLine [Tag='ItemDataLine' minOccurs=1 maxOccurs=-1 CT='DataLineType] [DES='All Elements Delimited' Del='|']
Itemdatalinenum
ItemTextLine [Tag='ItemTextLine' minOccurs=1 maxOccurs=-1 CT='TextLineType] [DES='Tagged Delimited' Del='<CR>' TDS='|']
AEDGroup [ DES='All Elements Delimited' Del='|' minOccurs=1, maxOccurs=1]
Itemtextlinenum
TDGroup [Del='<CR>' DES='Tagged Delimited' TDS='|']
ItemTextId [Tag='ItemTextId' minOccurs=1 maxOccurs=-1 CT='TextIdType] [DES='All Elements Delimited' Del='|']
ItemTextIdNum
ItemNumber [Tag='ItemNumber' minOccurs=1 maxOccurs=-1 CT='ItemNumberType] [DES='All Elements Delimited' Del='|']
ItemnumberValue
Trailer [Tag='Trailer' CT=TrailerType] [DES='All Elements Delimited' Del='|']
TrailerNumber
|
Note the following:
- 'Headername', 'Itemdatalinename' etc are tags, so they should not be declared as elements in your message model.
- AEDGroup and TDGroup are groups, not elements. You need two groups within ItemTextLineType. The first one consumes the untagged element 'itemtextlinenum', the second one consumes the tagged element ItemTextId. Groups do not appear in the message tree, so itemtextlinenum and ItemTextId will appear as children of ItemTextLine in the message tree.
- Most of the AED complex types only have a single child, so the delimiter will never actually be found. However, it will do no harm to include it, in case extra members are added to these structure in future.
Hope it works. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|