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 » How to access Choice fields in ESQL and Java

Post new topic  Reply to topic
 How to access Choice fields in ESQL and Java « View previous topic :: View next topic » 
Author Message
satya2481
PostPosted: Sun Nov 29, 2009 3:23 am    Post subject: How to access Choice fields in ESQL and Java Reply with quote

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
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Sun Nov 29, 2009 3:38 am    Post subject: Reply with quote

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
View user's profile Send private message
satya2481
PostPosted: Sun Nov 29, 2009 9:31 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
satya2481
PostPosted: Mon Nov 30, 2009 1:19 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
student
PostPosted: Mon Nov 30, 2009 2:38 am    Post subject: Reply with quote

Apprentice

Joined: 17 Mar 2009
Posts: 31
Location: UK

what is error you see?
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Nov 30, 2009 3:52 am    Post subject: Reply with quote

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
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 » How to access Choice fields in ESQL and Java
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.