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 » Model repeated smaller messages in a big message (MRM TDS)

Post new topic  Reply to topic
 Model repeated smaller messages in a big message (MRM TDS) « View previous topic :: View next topic » 
Author Message
Ramphart
PostPosted: Thu Aug 05, 2004 1:57 am    Post subject: Model repeated smaller messages in a big message (MRM TDS) Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

Hi,

- I'm using WMQI 2.1 CSD 07 on Windows 2000.
- I'm trying to create a Message Set with a TDS layer to model a repeated structure

Input Message 1
PAH1,F<CR><LF>
PALA,X,CVR<CR><LF>
PALB,Y,CLR<CR><LF>
PALC,Z,LVR<CR><LF>


Input Message 2
PAH1,F<CR><LF>
PALA,X,CVR<CR><LF>
PALB,Y,CLR<CR><LF>
PALC,Z,LVR<CR><LF>
PAH2,G<CR><LF>
PALD,1,KDX<CR><LF>
PALE,2,LDX<CR><LF>
PALF,3,RDX<CR><LF>


Info
- PAH indicates a header line
- PAL indicates a line item relating to the previous header (PAH)
- One PAH and the PAL's below it forms one message
- Fields are comma delimited
- Records are <CR><LF> delimited


Message Set Structure
CMT = Compound Type
DES = Data element separation
REI = Repeat Element Indicator


-Message (CMT - TDS: 'DES' = All elements delimited - 'Delimiter' = <CR><LF> - MessageSingle set to Repeat with 'REI' = <CR><LF> )
--MessageSingle (CMT - TDS: 'DES' = All elements delimited - 'Delimiter' = <CR><LF> - MsgLine set to Repeat with 'REI' = <CR><LF> )
----MsgHeader (CMT - TDS: 'DES' = All elements delimited - 'Delimiter' = <CR><LF>)
-------HdrCmpType (CMT - TDS: 'DES' = All elements delimited - 'Delimiter' = ,(comma) - 'Group Indicater' = PAH)
---------HdrNum (String)
---------HdrType (String)
----MsgLine (CMT - TDS: 'DES' = All elements delimited - 'Delimiter' = <CR><LF>)
-------LineCmpType (CMT - TDS: 'DES' = All elements delimited - 'Delimiter' = ,(comma) - 'Group Indicater' = PAL)
---------RecordType (String)
---------Action (String)
---------ClientID (String)


Results when testing
-Using Input Message 1 - One Message (i.e. One Header with its lines)

(0x1000021)MRM = (
(0x1000013)MsgSingleMessage = (
(0x1000013)MsgHeader = (
(0x300000B)HdrNum = '1'
(0x300000B)HdrType = 'F'
)
(0x1000013)MsgLines = (
(0x300000B)RecordType = 'A'
(0x300000B)Action = 'X'
(0x300000B)ClientID = 'CVR'
)
(0x1000013)MsgLines = (
(0x300000B)RecordType = 'B'
(0x300000B)Action = 'Y'
(0x300000B)ClientID = 'CLR'
)
(0x1000013)MsgLines = (
(0x300000B)RecordType = 'C'
(0x300000B)Action = 'Z'
(0x300000B)ClientID = 'LVR'
)


-Using Input Message 2 - MORE THAN One Message (i.e. Several Headers with its lines)
<ParserException>
<File>F:\build\S210_BP\src\MTI\MTIforBroker\MtiImbParser2\MtiImbFIHandler.cpp</File>
<Line>438</Line>
<Function>MtiImbFIHandler::endMessageContent</Function>
<Type />
<Name />
<Label />
<Text>MTI. Not all the buffer was used when reading message</Text>
<Catalog>WMQIv210</Catalog>
<Severity>3</Severity>
<Number>5288</Number>


HELP HELP HELP
-How do I model the repeating Message ?
-Thx in advance for any assistance

_________________
Applications Architect
Back to top
View user's profile Send private message
wooda
PostPosted: Thu Aug 05, 2004 2:29 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

I'd recommend the following:

Message (DES=Tagged Delimited, Delim=<CR><LF>)
- Group (repeat=yes,DES=Tagged Delimited, Delim=<CR><LF>, Length of Tag=3, RED=<CR><LF>)
-- MsgHeader(TAG=PAH,DES=All elements delim, delim=,(comma) repeat=no) [add child elements here]
-- MsgLine(TAG=PAL,DES=All elements delim, delim=,(comma)repeat=yes) [add child elements here]

So a repeating embedded compund type called Group. which repeats with a RED of <CR><LF>.
Group contains a tagged delimited structure where the children had a tag of length 3 (so no need for a tag data separator).
Group contains two fields MsgHeader and MsgLine.
MsgHeader has a tag of PAH and this field doesn't repeat. It contains a comma delimited struture the same as you described.
MsgLine has a tag of PAH and this field does repeat. It contains a comma delimited struture the same as you described.
Back to top
View user's profile Send private message
wooda
PostPosted: Thu Aug 05, 2004 2:35 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Spot the typo in the last line. Of course MsgLine should have a tag of PAL not PAH.
Back to top
View user's profile Send private message
Ramphart
PostPosted: Thu Aug 05, 2004 3:33 am    Post subject: Resolved Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

Hi Wooda,

Here's the deal. What you've suggested works great. You've saved my life. Now please explain to me why it works cause it's confusing the hell out of me . I need to understand the logic a bit better. Can you explain the thinking to me please.

wooda wrote:

Message (DES=Tagged Delimited, Delim=<CR><LF>)

By the way, I had to make the DES=All elements delimited for the Message, Not Tagged Delimited.

I'm sure this was a typo on your side?

Ramo
_________________
Applications Architect
Back to top
View user's profile Send private message
wooda
PostPosted: Thu Aug 05, 2004 4:16 am    Post subject: Reply with quote

Master

Joined: 21 Nov 2003
Posts: 265
Location: UK

Hi,

It is basicaly the difference between AED which is blind parsing with delimeters and Tagged which is looking at the message to see what to do next. You model would work until you got to a second PAH which the parser would assume was another PAL and then go off track.

FYI - For the message level compound type I don't think it matters if it's Tagged Delimited or AED. As this structure only has one child which is an embedded structure not an element (so never has a tag anyway). You will probably find if you try tagged delimited then you'd need to set a Tag Data Separator or tag length to avoid errors. Other than that no difference.

cheers,

-Alex
Back to top
View user's profile Send private message
Ramphart
PostPosted: Thu Aug 05, 2004 4:30 am    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2004
Posts: 150
Location: South Africa, JHB

wooda wrote:
It is basicaly the difference between AED which is blind parsing with delimeters and Tagged which is looking at the message to see what to do next.


Makes sense to me now. Thx a million.

Ramo
_________________
Applications Architect
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Model repeated smaller messages in a big message (MRM TDS)
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.