Author |
Message
|
satya2481 |
Posted: Sun Nov 29, 2009 3:23 am Post subject: How to access Choice fields in ESQL and Java |
|
|
Disciple
Joined: 26 Apr 2007 Posts: 170 Location: Bengaluru
|
Hi All,
I am using WMB V6.1 and my toolkit version is V6.1.0.5
The flow input is a fixed length message and the message definition created using Cobol Copy text. The structure of the message looks as below
Code: |
MasterMessage
Master - Complex Element 1 to -1
Field1 (Fixed Length) - 3Char, 1 - 1
Field2 (Fixed Length) - 1Char, 1 - 1
Field3 (Fixed Length) - 1Char, 1 - 1
Group1 (Composition = Choice, content validataion = Closed)
Field1 (Fixed length) = 21
ComplexElement - 1 to 1
Field1 (Fixed length) = 20
Field2 (Fixed length) = 1
|
The message flow looks as below
MQInput (BLOB) --> RCD Node (Above message definition with Immediate parsing) --> Java Compute Node --> MQOutput
When I send test message its getting parsed against the message definition in RCD node. But I am not able to see Group1 fields while debugging. After checking the forum and the help came to know that the choice type will gets resolved when we first time access the field.
I would like to know how to access Field1 and Field2 values in my ESQL code or in Java. My requirement is Java. But I have tried accessing from ESQL as "InputRoot.MRM.Master.ComplexElement.Field1" which is returing NULL.
Can some one tell me how to get the values of the choice Group fields.
Thanks in advance
Satya _________________ IBM Certified Solution Developer WebSphere Message Broker V6.0
IBM Certified System Administrator WebSphere MQ V6.0 |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Nov 29, 2009 3:38 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
I'd start by putting a Tracenode after the RCD and looking at the output of ${Root}
Remember to disconnect the debugger.
This could tell you things like
- if there were issues parsing the message
- What the actual field names are there thus giving you the path to the element in the tree. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
satya2481 |
Posted: Sun Nov 29, 2009 9:31 pm Post subject: |
|
|
Disciple
Joined: 26 Apr 2007 Posts: 170 Location: Bengaluru
|
Hi,
I have put the Trace node just after the RCD node and the log file content looks as below
Code: |
(0x0100001B:Name+):MRM = ( ['mrm' : 0x7231060]
(0x01000013:Name+):Master = (
(0x0300000B:NameValue+ ):Field1 = '212' (CHARACTER)
(0x0300000B:NameValue+ ):Field2 = 'N' (CHARACTER)
(0x0300000B:NameValue+ ):Field3 = 'J' (CHARACTER)
UNRESOLVED CHOICE = X'414243444142434441412020202020202020202020' |
After this test I have removed the RCD node and added it again and configured it and this time I am able to parse the message and get the Group field values in the ESQL code!!! Strange.... I think RCD node removal and adding it again resolved the issue.
Now I need to try how to access this field in Java code.
Thanks for the reply _________________ IBM Certified Solution Developer WebSphere Message Broker V6.0
IBM Certified System Administrator WebSphere MQ V6.0 |
|
Back to top |
|
 |
satya2481 |
Posted: Mon Nov 30, 2009 1:19 am Post subject: |
|
|
Disciple
Joined: 26 Apr 2007 Posts: 170 Location: Bengaluru
|
I am not able to access Group fields using Java Compute Node. If someone knows please share the information with me.
Thanks in Advance _________________ IBM Certified Solution Developer WebSphere Message Broker V6.0
IBM Certified System Administrator WebSphere MQ V6.0 |
|
Back to top |
|
 |
student |
Posted: Mon Nov 30, 2009 2:38 am Post subject: |
|
|
 Apprentice
Joined: 17 Mar 2009 Posts: 31 Location: UK
|
|
Back to top |
|
 |
kimbert |
Posted: Mon Nov 30, 2009 3:52 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
satya2481 said:
Quote: |
I have tried accessing from ESQL as "InputRoot.MRM.Master.ComplexElement.Field1" which is returing NULL. |
Compare that path with the Trace node output. The error should be obvious.
Also, if you have not already done so, please take a user trace. |
|
Back to top |
|
 |
|