Author |
Message
|
JuneCrell |
Posted: Thu Jun 13, 2002 2:11 pm Post subject: MRM Repeating Fields |
|
|
Newbie
Joined: 11 Jun 2002 Posts: 8
|
Is there anyway to set the repeating in MRM that take repeating segment for the following message:
There are 3 segments with segment 2(Purchases) has optional repeat(i.e 1 or more repeat)
Invoice Header
Invoice Number
Invoice Date
Purchases (repeating segment without specific count, could be one or more, i.e optional)
Item Number
Item Name
Item Quantity
Item Price
Total
Total Items
Total Price
Can the Repeat option in the Connection tab be set to 'Value Of' and how to do that? On my system, the 'Value Of' is disabled for selection, it’s always set to Count (the default).
When I select repeat type as 'Count' and set the count value to 3, as expected only mesages with 3 repeating fields are parsed correctly. However my message could have one or more repeating fields. Any suggestion?
Would the “Value of” Repeat Count Type solved this repeating problem? |
|
Back to top |
|
 |
kirani |
Posted: Thu Jun 13, 2002 3:14 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
MRM also support "OCCURS DEPENDING UPON [IntegerVariable]".
If you could add an integer variable before "Purchases", you can handle variable number of repeats. So your message model will look like this,
Code: |
Invoice Header
Invoice Number
Invoice Date
NumberOfPurchases (holds the count for number of Purchases repeat)
Purchases
Item Number
Item Name
Item Quantity
Item Price
Total
Total Items
Total Price
|
Once you add an integer elemebt before "Purchases" Value Of will get enabled.
Hope this helps. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
JuneCrell |
Posted: Thu Jun 13, 2002 4:25 pm Post subject: |
|
|
Newbie
Joined: 11 Jun 2002 Posts: 8
|
By adding the integer element, the Value Of is enabled and selected. This time the message was sent to the failure queue from the Filter node. The trace exceptionlist shows the following:
'MtiImbParser::parseFirstChild'
' '
' '
' '
'MTI Parsing Errors have occurred'
.
.
'MtiImbParser::parseCwfBuffer'
.
.
'Error Extracting a message from the record oriented bitstream.'
.
.
Any idea to resolve this problem? Thanks. |
|
Back to top |
|
 |
kirani |
Posted: Thu Jun 13, 2002 4:34 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Can you post complete ExceptionList here? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
JuneCrell |
Posted: Thu Jun 13, 2002 5:22 pm Post subject: |
|
|
Newbie
Joined: 11 Jun 2002 Posts: 8
|
Here's the trace.
(
(0x1000000)RecoverableException = (
(0x3000000)File = 'F:/build/S000_P/src/DataFlowEngine/ImbDataFlowNode.cpp'
(0x3000000)Line = 538
(0x3000000)Function = 'ImbDataFlowNode::createExceptionList'
(0x3000000)Type = 'ComIbmFilterNode'
(0x3000000)Name = '92d'
(0x3000000)Label = 'REPEATING.Filter2'
(0x3000000)Text = 'Node throwing exception'
(0x3000000)Catalog = 'MQSIv201'
(0x3000000)Severity = 3
(0x3000000)Number = 2230
(0x1000000)ParserException = (
(0x3000000)File = 'F:/build/S000_P/src/MTI/MTIforBroker/MtiImbParser/mtiImbParser.cpp'
(0x3000000)Line = 1280
(0x3000000)Function = 'MtiImbParser::parseFirstChild'
(0x3000000)Type = ''
(0x3000000)Name = ''
(0x3000000)Label = ''
(0x3000000)Text = 'MTI Parsing Errors have occurred'
(0x3000000)Catalog = 'MQSIv201'
(0x3000000)Severity = 3
(0x3000000)Number = 5285
(0x1000000)ParserException = (
(0x3000000)File = 'F:/build/S000_P/src/MTI/MTIforBroker/MtiImbParser/mtiImbParser.cpp'
(0x3000000)Line = 560
(0x3000000)Function = 'MtiImbParser::parseCwfBuffer'
(0x3000000)Type = ''
(0x3000000)Name = ''
(0x3000000)Label = ''
(0x3000000)Text = 'Error Extracting a mesage from the record oriented bitstream.'
(0x3000000)Catalog = 'MQSIv201'
(0x3000000)Severity = 3
(0x3000000)Number = 5125
(0x1000000)Insert = (
(0x3000000)Type = 2
(0x3000000)Text = '-15'
)
(0x1000000)ParserException = (
(0x3000000)File = 'F:/build/S000_P/src/MTI/MTIforBroker/MtiImbParser/mtiImbParser.cpp'
(0x3000000)Line = 2738
(0x3000000)Function = 'MtiImbParser::handlecwferr'
(0x3000000)Type = ''
(0x3000000)Name = ''
(0x3000000)Label = ''
(0x3000000)Text = 'CWF Read Buffer Overflow'
(0x3000000)Catalog = 'MQSIv201'
(0x3000000)Severity = 3
(0x3000000)Number = 5181
(0x1000000)Insert = (
(0x3000000)Type = 2
(0x3000000)Text = '-15'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'GetMessageFromLegacyBitstream'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'DPFEIM007G001'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'RepeatDataMessage'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'Bdy_Field3'
)
(0x1000000)Insert = (
(0x3000000)Type = 5
(0x3000000)Text = 'Bdy_Field3'
)
)
)
)
)
) |
|
Back to top |
|
 |
kirani |
Posted: Thu Jun 13, 2002 6:41 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Looks like your input message is not of the correct length. Make sure you are sending the same number of bytes as expected by the MRM messageset. Please check that you have set proper length and Physical Datatypes in CWF tab. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
aljohnson80 |
Posted: Fri Jun 14, 2002 7:48 am Post subject: |
|
|
Newbie
Joined: 11 Jun 2002 Posts: 8
|
I merely add an integer element before "Purchases" and the Value Of will get enabled.
I used the same old data. |
|
Back to top |
|
 |
kirani |
Posted: Fri Jun 14, 2002 8:00 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You cannot use the same old input message here! You will have to modify your input message to have value for integer vairable that you just introduced.
For example, If you have created an integer variable with Physical Type of Extended Decimal of length 3, i.e. it will store value upto 999. Now you have to modify your input message to have 3 more bytes of data (before purchases data), which will tell you how many times purchases is repeating. It it repeats 3 times, you should add 003 in your input message.
Try sending modified input message and see if it works or not. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
JuneCrell |
Posted: Fri Jun 14, 2002 11:42 am Post subject: |
|
|
Newbie
Joined: 11 Jun 2002 Posts: 8
|
The application data could not be changed to include the number of occurance for purchase items. The repeat is random(i.e there could be no repeat or many repeats), and the input data does not have the number of purchases. Could MRM handle this situation?
Thank you. |
|
Back to top |
|
 |
kirani |
Posted: Fri Jun 14, 2002 2:00 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You need to have some intermediate step to modify the message before it is parsed by MRM. MRM cannot handle your message directly.
Try reading your message as BLOB in WMQI and then manipulate it using compute node to insert integer value at appropriate position depending on number of repeats. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
JuneCrell |
Posted: Fri Jun 14, 2002 7:40 pm Post subject: |
|
|
Newbie
Joined: 11 Jun 2002 Posts: 8
|
It works!
Neon formatter has the ability to handle this repeat scenario without adding the integer variable.
I will be working on the BOLB.
Thank you very much. You are great!  |
|
Back to top |
|
 |
|