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 » UNRESOLVED CHOICE

Post new topic  Reply to topic Goto page 1, 2  Next
 UNRESOLVED CHOICE « View previous topic :: View next topic » 
Author Message
Gopal
PostPosted: Tue Jan 06, 2004 6:09 am    Post subject: UNRESOLVED CHOICE Reply with quote

Novice

Joined: 22 Jan 2003
Posts: 19
Location: Bangalore

What does UNRESOLVED CHOICE mean? why does this error occur? How to correct it?
My MRM is like this

MYMRM
|_MYIND (Ordered Set)
| |_ Indicator STRING (length 1)
|
|_TDSType(Choice)
|_ Type A (Ordered Set)
| |_ Elm1 STRING (length 4)
| |_ Elm2 STRING (length 4)
|_ Type B (Ordered Set)
|_ Elm3 STRING (length 5)
|_ Elm4 STRING (length 5)

I get an error like this when I give a value of L1234512345 in my input queue. I'm using choice as type composition for a type which contains 2 compound types of ordered set type composition.

(0x1000021)MRM = (
(0x300000B)Indicator = 'L'
UNRESOLVED CHOICE = X'31323334353132333435'
)

My code is this.
If "InputBody"."Indicator" = 'L' then
Set OutputRoot.XML.Root.Field1 = "InputBody"."Elm3";
Set OutputRoot.XML.Root.Field2 = "InputBody"."Elm4";
end if;

Elm3 and Elm4 are of length 5 each in my MRM.

What is the error in this? I have also observed that I get an abend like this.

( MQSI.default ) Broker process terminating abnormally: The following diagnostic information will be required when contacting IBM: '
Severe Abend Error detected.
For full details see Abend File: E:/IBM/WebSphere MQ Integrator 2.1/errors/MQSI.default.599.511.Abend
A summary of the Error follows:
An Unhandled Exception detected in process 599, on thread 0x1FF.
Type: EXCEPTION_ACCESS_VIOLATION (C0000005).
Address: 001B:0BC07805.
The thread could not read from memory address 0x00000188.

And abend file is like this....
File: F:\build\S210_P\src\CommonServices\Win32\ImbAbend.cpp
Line: 1129
Function: ImbAbend::unhandledExceptionFilterInternal()
AbendAction: 3

---> Inserts <---
An Unhandled Exception detected in process 186, on thread 0x2C9.
Type: EXCEPTION_ACCESS_VIOLATION (C0000005).
Address: 001B:0BC07AC0.
The thread could not read from memory address 0x3912442C.

What is problem here?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jan 06, 2004 6:56 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

What "UNRESOLVED CHOICE" is telling you is that the parser has been unable to determine if whether TypeA should be an Elem1 or an Elem2.

The reason it can't determine it is that you've given it no way to know - you have not given it a tag or anything it can use to decide for itself, and you haven't written an ESQL that forces a decision (by accessing Elem1 or Elem2).

But that shouldn't be related to the abend you are seeing, I don't think. So that's a separate issue - and I don't know what it means.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
EddieA
PostPosted: Tue Jan 06, 2004 7:56 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

I'm guessing that the Trace information you posted came from a node before the Compute node, because (as Jeff pointed out) until you reference any of the Elmx fields, WMQI doesn't know if the message is Type A or Type B. In the Compute node where you reference the fields, WMQI then knows that it's type B. In that Compute node, if you copied Entire message (just for a test) as well as building the XML, then a Trace node following would show that the message had been fully parsed.

BTW. Any message that is being used by this scenario must always be 11 bytes long. Even the Type A messages, as WMQI cannot handle diferent length inputs on a choice.

Also, like Jeff, I don't know what the abend is. Time to call IBM support.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jan 06, 2004 9:22 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Being a bit picky, the snippet which you quoted is not an error at all - its part of a normal trace node output. WMQI is correctly telling you what the tree looks like at that point in the message flow.

The abends are certainly an error...do call IBM support, as suggested.
Back to top
View user's profile Send private message
Gopal
PostPosted: Tue Jan 06, 2004 8:47 pm    Post subject: Reply with quote

Novice

Joined: 22 Jan 2003
Posts: 19
Location: Bangalore

MY MRM is like this

Code:
MYMRM
   |_MYIND (Ordered Set)
   |      |_ Indicator STRING (length 1)
   |_TDSType(Choice)
          |_ Type A (Ordered Set)
          |    |_ Elm1 STRING (length 4)
          |    |_ Elm2 STRING (length 4)
          |_ Type B (Ordered Set)
               |_ Elm3 STRING (length 5)
               |_ Elm4 STRING (length 5)


My code is this.
Code:

If "InputBody"."Indicator" = 'L' then
  Set OutputRoot.XML.Root.Field1 = "InputBody"."Elm3";
  Set OutputRoot.XML.Root.Field2 = "InputBody"."Elm4";
else
   If "InputBody"."Indicator" = 'P' then
       Set OutputRoot.XML.Root.Field3 = "InputBody"."Elm1";
       Set OutputRoot.XML.Root.Field4 = "InputBody"."Elm2";
   endif;
end if;


In the TDSType I'm expecting either compound type Type A or Type B.
And not at the element level.(Elm1 or Elm2). I have to see now in the code how to handle these compound types.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jan 07, 2004 3:57 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

So you have 'L' followed by either 8 bytes (if type A) or 10 bytes (type B).
How can the parser know whether its type A or type B? Is there something in the data which you could look at, or is the length the only reliable difference between them?
Either way, you may be able to get around the problem by setting the Data Element Separation to 'Data Pattern' on both Type A and Type B.
Type A data pattern would be .{8}
Type B data pattern would be .{10}

If you try this, make sure that the longest brach (Type B) is listed first in the choice - otherwise your data pattern for Type A will successfully match Type B as well.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jan 07, 2004 5:18 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Rather than using Data Patterns, I'd recommed Gopal use simple tags instead.

That is, delete the Indicator field and then turn it into a Tag.

Then the TDS parser will be able to resolve the choice.

Also, for the logical model Gopal provided, the code to access Elem1 would have to be InputBody."Type A".Elem1, and not InputBody.Elem1.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jan 07, 2004 6:17 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
Also, for the logical model Gopal provided, the code to access Elem1 would have to be InputBody."Type A".Elem1, and not InputBody.Elem1.

This is only true if Gopal creates elements called 'TypeA' and 'TypeB' (which he would have to do in order to define tags). But his ESQL paths were correct for the logical model which he provided.

I agree with Jeff that it would be better to use tags rather than Data Pattern. The correct model is:

Code:

MYIND Composition=Choice DataElementSeparation==TaggedFixedLength
  -- ElementA  Tag='P' (and based on compound type TypeA)
      -- Elem1
      -- Elem2
  -- ElementA  Tag='L' (and based on compound type TypeB)
      -- Elem3
      -- Elem4


Compound Types 'TypeA' and 'TypeB' should be OrderedSets with Data Element Separation of 'Fixed Length'.
Back to top
View user's profile Send private message
rajaram
PostPosted: Thu Jan 08, 2004 1:01 am    Post subject: Reply with quote

Acolyte

Joined: 02 Jan 2004
Posts: 53

hi,

I am using CWF FORMAT for the structure that kimbert has proposed. I am also having the constraint that the elements Element A and Element B are repeatable in any order.

for eg. element A, Element B, Element B, Element A, Element A, Element B, Element A, Element B...etc..

Can any one please tell me how to handle the situation in this case? Can I use the same structure as proposed by kimbert in this case. How to handle the code in this case ( since they are repeatable)?

Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jan 08, 2004 1:28 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Rajaram,

My previous post was describing a TDS physical format for a non-repeating choice. You're trying to handle a repeating choice in CWF, so your solution will look quite different.

I'll need some more details before I can suggest a solution.
1. How many repeats are there? Is the number of repeats fixed or variable?
2. Is ElementB the same length as ElementA?
3. If they are different lengths, is the shorter element padded to the same length as the longer one.
4. How will the ESQL identify whether a particular repeat is ElementA or ElementB?
Back to top
View user's profile Send private message
rajaram
PostPosted: Thu Jan 08, 2004 3:56 am    Post subject: Reply with quote

Acolyte

Joined: 02 Jan 2004
Posts: 53

Hi,

thanks for reply,

1. the No. of Repeats are Variable.
2. Element A has 5 elements with a length of 54.
Element B has 9 elements with a length of 86
3. Please tell me in both cases whether padded or not..how to handle?
4. The first field of Both Element A and Element B decides which one is selected. if the first field is 1 , then Element A is selected. if it is 2, the Element B is selected and the first field is same for both i.e., the first field in element A is field1 and in second Element also, it is field1.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Jan 08, 2004 8:43 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You have a very difficult scenario there. The CWF parser cannot resolve a choice on its own. When it encounters a choice, it picks up a segment of the bitstream (as large as the largest branch of the choice) and puts it into the message tree. This is called an unresolved choice. Later on, if some ESQL refers to a branch of the choice, the unresolved choice is parsed, and its node is replaced with the parsed nodes.

In your case, you will need to
    * parse the message as a single BINARY field, with the Length Units property set to 'End of Bitstream'.
    * Write an ESQL loop which examines the first byte of each record, and then resolves it to the correct branch of the choice.

That probably sounds as if you're writing a parser in ESQL, but at least the contents of ElementA or ElementB will get automatically parsed for you (assuming that they are complex elements)
Back to top
View user's profile Send private message
Gopal
PostPosted: Fri Jan 09, 2004 3:32 am    Post subject: Reply with quote

Novice

Joined: 22 Jan 2003
Posts: 19
Location: Bangalore

Kimbert, when I used this following code as suggested by you it failed at the deployment only.

Code:

MYIND Composition=Choice DataElementSeparation==TaggedFixedLength
  -- ElementA  Tag='P' (and based on compound type TypeA)
      -- Elem1
      -- Elem2
  -- ElementA  Tag='L' (and based on compound type TypeB)
      -- Elem3
      -- Elem4


My message has one 1 Byte field to identify what compound type it is and followed by the compond type which in turn has TypeA and TypeB compound types. If I want to move this one Byte field to into TypeA and TypeB and still be able to get only one compound type at a time then how to do it? In my message there are no tags. But I still want to use 'P', 'L' to distinguish each message without application programming.
L1234512345
P12341234
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jan 09, 2004 4:20 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Gopal,

Quote:
In my message there are no tags

So what are the 'L' and the 'P' if they are not tags? Surely, this first character is the tag which identifies the record?

You say it failed at deployment. How did it fail? What was the error message?

Quote:
If I want to move this one Byte field to into TypeA and TypeB and still be able to get only one compound type at a time then how to do it?

Why would you want to move the tag into TypeA and TypeB? Can you explain your reasoning. From my point of view, the 'L' or the 'P' are not part of the actual data content of the message, so they don't need to be put into the message tree.

Don't give up yet - your scenario is not a complicated one, unless I'm missing something. You should not need any application programming.
Back to top
View user's profile Send private message
fjcarretero
PostPosted: Fri Jan 09, 2004 8:06 am    Post subject: Reply with quote

Voyager

Joined: 13 Oct 2003
Posts: 88

Gopal,

Why don't you use 'multipart messages'. I don't think you can achieve what you want with 'choice'. When you have choices that are different in length, this is the only alternative.

You don't have to change the code, only the message set. You can define 2 messages, one for each alternative and create a field of type message.

I have successfully coded this solution. If you want me to I could send to you my code.

Felipe
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » UNRESOLVED CHOICE
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.