|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
CSV Complex Message |
« View previous topic :: View next topic » |
Author |
Message
|
javaforvivek |
Posted: Mon Dec 06, 2004 3:32 am Post subject: CSV Complex Message |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
I have following message:
5000,99 (InfoAboutMessage)
04/12/2004,10000 (Header)
1,300,Mumbai (TransactionLine)
2,8900,Mumbai (TransactionLine)
3,100,Mumbai (TransactionLine)
19300 (Footer)
04/12/2004,10000 (Header)
1,300,Mumbai (TransactionLine)
2,8900,Mumbai (TransactionLine)
19400 (Footer)
04/12/2004,10000 (Header)
1,300,Mumbai (TransactionLine)
19500 (Footer)
Each line is separated by <CR><LF>.
How can I define the message set?
I have tried with different combinations; before coming to a solution of inserting some delimiter like * before evry footer, and it works fine.. but by doing this, I am changing original message..
I want to continue without modifying input message. _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
wooda |
Posted: Tue Dec 07, 2004 3:33 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
Hi Vivek -
Could you give us a bit more info on your message.
Are all the three fields within a transactionLine mandatory ?
Does the transactionLine repeat an unknown number of times ?
The first field of the transactionLine appeared to be a tag of some sorts. Is this correct or was that just the data you chose ?
The data in the footer seems to follow a pattern. Is this co-incidence or is this always the case (ie. it is a 5 digit integer of the form 19xxx) ?
Is there anything that can distinguish a TransactionLine from a Footer from a Header ? Without understanding the data the only obvious difference is the number of field in each record.
If I can understand your data then I can better come up with a possible solution for you. |
|
Back to top |
|
 |
javaforvivek |
Posted: Tue Dec 07, 2004 5:15 am Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
I will just describe the message in details; I'm sorry for not being clear in first place.
Quote: |
Are all the three fields within a transactionLine mandatory ? |
Yes they are mandatory- they are : Transaction Number, TransactionAmount and City
Quote: |
Does the transactionLine repeat an unknown number of times?
|
Yes, it repeats an unknown times.
Even Header contains two fields : - Transaction Date, Opening Balance
InfoAboutMessage also contains 2 fields: CompanyCode, SiteId
Quote: |
The first field of the transactionLine appeared to be a tag of some sorts. Is this correct or was that just the data you chose ? |
Please refer to first answer..
Quote: |
The data in the footer seems to follow a pattern. Is this co-incidence or is this always the case (ie. it is a 5 digit integer of the form 19xxx) ? |
No, its not a pattern.. The footer indicates the Closing Balance. I haven't calculated it from adding opening balance from header and transaction amount in TransactionLine.. but it should be so.
Quote: |
Is there anything that can distinguish a TransactionLine from a Footer from a Header ? Without understanding the data the only obvious difference is the number of field in each record. |
All lines are <CR><LF> separated. It's true that obvious difference is no. of fields in each line.
Probably I should rewrite the message to clarify the Footer Confusion:
5000,99 (InfoAboutMessage)
04/12/2004,10000 (Header)
1,300,Mumbai (TransactionLine)
2,8900,Mumbai (TransactionLine)
3,100,Mumbai (TransactionLine)
19300 (Footer) which is equal to 10000+300+8900+100
04/12/2004,10000 (Header)
1,300,Mumbai (TransactionLine)
2,8900,Mumbai (TransactionLine)
19200 (Footer) which is equal to 10000+300+8900
04/12/2004,10000 (Header)
1,300,Mumbai (TransactionLine)
10300 (Footer) which is equal to 10000+300 _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
wooda |
Posted: Wed Dec 08, 2004 5:03 am Post subject: |
|
|
 Master
Joined: 21 Nov 2003 Posts: 265 Location: UK
|
Hi Vivek -
Given that the only distinguishing feature of a Header from a Footer from a transactionLine is the number of fields in each then I think you need to use a model which uses a data pattern to parse this.
I haven't tried it but I think you will need two levels of pattern.
One for idetifying an entire transactionGroup (Header+nxtransactionLines+Footer)
and another to differentiate between the transactionLines and the footer. |
|
Back to top |
|
 |
javaforvivek |
Posted: Wed Dec 08, 2004 8:51 pm Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
Can you throw some light on how o use Data Patterns in WBIMB? I am on v5+CSD4.
I have nevr used Data Patterns in broker. Any good material available? _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
JT |
Posted: Wed Dec 08, 2004 9:22 pm Post subject: |
|
|
Padawan
Joined: 27 Mar 2003 Posts: 1564 Location: Hartford, CT.
|
|
Back to top |
|
 |
javaforvivek |
Posted: Thu Dec 09, 2004 5:53 am Post subject: |
|
|
 Master
Joined: 14 Jun 2002 Posts: 282 Location: Pune,India
|
Thanks for the link JT.
I tried the sample msg given in the help as:
Code: |
Message definition:
Complex type namely Type1: Data Element Separation=Use Data Pattern
Field1 (local Element to Type1): xsd:string minOccurs=1, maxOccurs=1, Length=5, Pad=SPACE,
Data Pattern=".{5}"
Field2(local Element to Type1): xsd:int minOccurs=0, maxOccurs=1,
Data Pattern="[0-9]{0,6}"
Field3(local Element to Type1): xsd:string minOccurs=1, maxOccurs=1, minLength=3, maxLength=4,
Data Pattern="[A-Z][A-Za-z0-9]{2,3}"
|
I have created a msgflow. Set MQInput Node proeprties as:
msgdomain = MRM
msgformat=TDS1
msgtype=Type1 and appropriate msgset.
When I tried to put sample msges, like :
Code: |
Input1: "ABCDE123F12"
Result1: Field1="ABCDE", Field2="123", Field3="F12"
|
but this what i got in trace:
Timestamps are formatted in local time, 330 minutes past GMT.
2004-12-09 19:19:17.232322 1400 UserTrace BIP2632I: Message received and propagated to 'out' terminal of MQ input node 'DataPatternDemoMsgFlow.MQInput'.
2004-12-09 19:19:17.232557 1400 UserTrace BIP6060I: Parser type 'Properties' created on behalf of node 'DataPatternDemoMsgFlow.MQInput' to handle portion of incoming message of length 0 bytes beginning at offset '0'.
2004-12-09 19:19:17.232675 1400 UserTrace BIP6061I: Parser type 'MQMD' created on behalf of node 'DataPatternDemoMsgFlow.MQInput' to handle portion of incoming message of length '364' bytes beginning at offset '0'. Parser type selected based on value 'MQHMD' from previous parser.
2004-12-09 19:19:17.232809 1400 UserTrace BIP6061I: Parser type 'MRM' created on behalf of node 'DataPatternDemoMsgFlow.MQInput' to handle portion of incoming message of length '13' bytes beginning at offset '364'. Parser type selected based on value 'MRM' from previous parser.
2004-12-09 19:19:17.232929 1400 UserTrace BIP2538I: Node 'DataPatternDemoMsgFlow.Trace': Evaluating expression 'Root' at (, 1.3).
2004-12-09 19:19:17.263729 1400 UserTrace BIP4060I: Data '(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'LFV7DR8002001'
(0x03000000):MessageType = 'Type1'
(0x03000000):MessageFormat = 'TDS1'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2004-12-09 13:49:17.230'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'PATTERN_IN'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = ' '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d51205742524b5f514d2020202020abdfb34120006009'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'WBRK_QM '
(0x03000000):UserIdentifier = 'puranikv '
(0x03000000):AccountingToken = X'16010515000000650d0c4adc20d273d9658312f504000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = 'E:\MQSI-Docs\rfhutil.exe '
(0x03000000):PutDate = DATE '2004-12-09'
(0x03000000):PutTime = GMTTIME '13:49:17.230'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000021):MRM = ' from trace node 'DataPatternDemoMsgFlow.Trace'.
The trace node 'DataPatternDemoMsgFlow.Trace' has output the specified trace data.
This is an information message provided by the message flow designer. The user response will be determined by the local environment.
2004-12-09 19:19:17.264625 1400 Error BIP2628E: Exception condition detected on input node 'DataPatternDemoMsgFlow.MQInput'.
The input node 'DataPatternDemoMsgFlow.MQInput' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.
Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.
2004-12-09 19:19:17.264665 1400 RecoverableException BIP2230E: Error detected whilst processing a message in node 'DataPatternDemoMsgFlow.Trace'.
The message broker detected an error whilst processing a message in node 'DataPatternDemoMsgFlow.Trace'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2004-12-09 19:19:17.264711 1400 ParserException BIP5285E: Message Translation Interface Parsing Errors have occurred:
Message Set Name : 'DataPatternDemoMsgSet'
Message Set Level : '1'
Message Format : 'TDS1'
Message Type Path : 'Type1'
Review further error messages for an indication to the cause of the errors.
2004-12-09 19:19:17.264757 1400 ParserException BIP5424S: No Message Id received in TDS Parser Initialization
The TDS worker is not receiving a proper Message Id parameter during initialization.
Ensure that the message identifier used in your message matches the message as defined in the Message Brokers Toolkit.
2004-12-09 19:19:18.264698 1400 Error BIP2648E: Message backed out to a queue; node 'DataPatternDemoMsgFlow.MQInput'.
Node 'DataPatternDemoMsgFlow.MQInput' has received a message which has previously been backed out one or more times because of a processing error in the main path of the message flow. The failure terminal is not attached, so the message broker is putting the message directly to the requeue or dead letter backout queue associated with this node. The MQMD 'backoutCount' of the message now equals the 'backoutThreshold' defined for the WebSphere Business Integration input queue.
Examine previous messages and the message flow to determine why the message is being backed out. Correct this situation if possible. Perform any local error recovery processing required.
2004-12-09 19:19:18.265001 1400 Error BIP2630I: No backout queue or DLQ defined for a message to be backed out; input node 'DataPatternDemoMsgFlow.MQInput' received from queue 'PATTERN_IN'
The input node 'DataPatternDemoMsgFlow.MQInput' received a message from queue 'PATTERN_IN', but was forced to attempt a backout due to the detection of an internal failure condition associated with it. The message broker has now attempted to propagate the message to the 'backoutRequeueQueueName' or the dead letter queue, but neither of these queues exist. The message is no longer processed by the message flow and continues to be backed out periodically. This situation can cause other messages to build up on the input queue until this message is removed or successfully processed.
Examine previous messages and possibly the message flow to determine why the message is being backed out. Defining either the 'backoutRequeueQueue' or the dead letter queue will cause the message to be propagated to one of those queues.
2004-12-09 19:19:25.550247 1400 UserTrace BIP2632I: Message received and propagated to 'out' terminal of MQ input node 'DataPatternDemoMsgFlow.MQInput'.
2004-12-09 19:19:25.550334 1400 UserTrace BIP6060I: Parser type 'Properties' created on behalf of node 'DataPatternDemoMsgFlow.MQInput' to handle portion of incoming message of length 0 bytes beginning at offset '0'.
2004-12-09 19:19:25.551137 1400 UserTrace BIP6061I: Parser type 'MQMD' created on behalf of node 'DataPatternDemoMsgFlow.MQInput' to handle portion of incoming message of length '364' bytes beginning at offset '0'. Parser type selected based on value 'MQHMD' from previous parser.
2004-12-09 19:19:25.551336 1400 UserTrace BIP6061I: Parser type 'MRM' created on behalf of node 'DataPatternDemoMsgFlow.MQInput' to handle portion of incoming message of length '13' bytes beginning at offset '364'. Parser type selected based on value 'MRM' from previous parser.
2004-12-09 19:19:25.551406 1400 UserTrace BIP2538I: Node 'DataPatternDemoMsgFlow.Trace': Evaluating expression 'Root' at (, 1.3).
2004-12-09 19:19:25.551988 1400 UserTrace BIP4060I: Data '(
(0x01000000):Properties = (
(0x03000000):MessageSet = 'LFV7DR8002001'
(0x03000000):MessageType = 'Type1'
(0x03000000):MessageFormat = 'TDS1'
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Transactional = TRUE
(0x03000000):Persistence = FALSE
(0x03000000):CreationTime = GMTTIMESTAMP '2004-12-09 13:49:25.540'
(0x03000000):ExpirationTime = -1
(0x03000000):Priority = 0
(0x03000000):ReplyIdentifier = X'000000000000000000000000000000000000000000000000'
(0x03000000):ReplyProtocol = 'MQ'
(0x03000000):Topic = NULL
)
(0x01000000):MQMD = (
(0x03000000):SourceQueue = 'PATTERN_IN'
(0x03000000):Transactional = TRUE
(0x03000000):Encoding = 546
(0x03000000):CodedCharSetId = 437
(0x03000000):Format = ' '
(0x03000000):Version = 2
(0x03000000):Report = 0
(0x03000000):MsgType = 8
(0x03000000):Expiry = -1
(0x03000000):Feedback = 0
(0x03000000):Priority = 0
(0x03000000):Persistence = 0
(0x03000000):MsgId = X'414d51205742524b5f514d2020202020abdfb3412000600a'
(0x03000000):CorrelId = X'000000000000000000000000000000000000000000000000'
(0x03000000):BackoutCount = 0
(0x03000000):ReplyToQ = ' '
(0x03000000):ReplyToQMgr = 'WBRK_QM '
(0x03000000):UserIdentifier = 'puranikv '
(0x03000000):AccountingToken = X'16010515000000650d0c4adc20d273d9658312f504000000000000000000000b'
(0x03000000):ApplIdentityData = ' '
(0x03000000):PutApplType = 11
(0x03000000):PutApplName = 'E:\MQSI-Docs\rfhutil.exe '
(0x03000000):PutDate = DATE '2004-12-09'
(0x03000000):PutTime = GMTTIME '13:49:25.540'
(0x03000000):ApplOriginData = ' '
(0x03000000):GroupId = X'000000000000000000000000000000000000000000000000'
(0x03000000):MsgSeqNumber = 1
(0x03000000):Offset = 0
(0x03000000):MsgFlags = 0
(0x03000000):OriginalLength = -1
)
(0x01000021):MRM = ' from trace node 'DataPatternDemoMsgFlow.Trace'.
The trace node 'DataPatternDemoMsgFlow.Trace' has output the specified trace data.
This is an information message provided by the message flow designer. The user response will be determined by the local environment.
2004-12-09 19:19:25.552827 1400 Error BIP2628E: Exception condition detected on input node 'DataPatternDemoMsgFlow.MQInput'.
The input node 'DataPatternDemoMsgFlow.MQInput' detected an error whilst processing a message. The message flow has been rolled-back and, if the message was being processed in a unit of work, it will remain on the input queue to be processed again. Following messages will indicate the cause of this exception.
Check the error messages which follow to determine why the exception was generated, and take action as described by those messages.
2004-12-09 19:19:25.552867 1400 RecoverableException BIP2230E: Error detected whilst processing a message in node 'DataPatternDemoMsgFlow.Trace'.
The message broker detected an error whilst processing a message in node 'DataPatternDemoMsgFlow.Trace'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2004-12-09 19:19:25.552906 1400 ParserException BIP5285E: Message Translation Interface Parsing Errors have occurred:
Message Set Name : 'DataPatternDemoMsgSet'
Message Set Level : '1'
Message Format : 'TDS1'
Message Type Path : 'Type1'
Review further error messages for an indication to the cause of the errors.
2004-12-09 19:19:25.552940 1400 ParserException BIP5424S: No Message Id received in TDS Parser Initialization
The TDS worker is not receiving a proper Message Id parameter during initialization.
Ensure that the message identifier used in your message matches the message as defined in the Message Brokers Toolkit.
2004-12-09 19:19:26.552972 1400 Error BIP2648E: Message backed out to a queue; node 'DataPatternDemoMsgFlow.MQInput'.
Node 'DataPatternDemoMsgFlow.MQInput' has received a message which has previously been backed out one or more times because of a processing error in the main path of the message flow. The failure terminal is not attached, so the message broker is putting the message directly to the requeue or dead letter backout queue associated with this node. The MQMD 'backoutCount' of the message now equals the 'backoutThreshold' defined for the WebSphere Business Integration input queue.
Examine previous messages and the message flow to determine why the message is being backed out. Correct this situation if possible. Perform any local error recovery processing required.
2004-12-09 19:19:26.553279 1400 Error BIP2630I: No backout queue or DLQ defined for a message to be backed out; input node 'DataPatternDemoMsgFlow.MQInput' received from queue 'PATTERN_IN'
The input node 'DataPatternDemoMsgFlow.MQInput' received a message from queue 'PATTERN_IN', but was forced to attempt a backout due to the detection of an internal failure condition associated with it. The message broker has now attempted to propagate the message to the 'backoutRequeueQueueName' or the dead letter queue, but neither of these queues exist. The message is no longer processed by the message flow and continues to be backed out periodically. This situation can cause other messages to build up on the input queue until this message is removed or successfully processed.
Examine previous messages and possibly the message flow to determine why the message is being backed out. Defining either the 'backoutRequeueQueue' or the dead letter queue will cause the message to be propagated to one of those queues.
Threads encountered in this trace:
1400
What's wrong here? accroding to the documentation I should get the expected result. _________________ Vivek
------------------------------------------------------
...when you have eliminated the impossible, whatever remains, however improbable, must be the truth. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Dec 10, 2004 1:11 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
2004-12-09 19:19:17.264757 1400 ParserException BIP5424S: No Message Id received in TDS Parser Initialization
The TDS worker is not receiving a proper Message Id parameter during initialization.
Ensure that the message identifier used in your message matches the message as defined in the Message Brokers Toolkit. |
Check that you have set the MessageType property on your input message. You can either set it via the RFH2 header, or via the Input node properties. |
|
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
|
|
|
|