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 » tagged encoded length elements

Post new topic  Reply to topic
 tagged encoded length elements « View previous topic :: View next topic » 
Author Message
farbman
PostPosted: Fri Jan 28, 2011 2:40 am    Post subject: tagged encoded length elements Reply with quote

Newbie

Joined: 19 Sep 2008
Posts: 8

Hi,

I stumbled across a little bit weird tagged format where all the tagged elements are as following.
XXXXYYYYDDDDDDDDDDDDD

XXXX=Length of DDDDDD
YYYY=TAG
DDDD=Element Data

The record is fixed length in total but all elements in it are optional except the last element which is a filler up to the fixed length.

I failed to model this in the message set editor and will do all parsing in the jcn instead.

Anyone know if it is possible to parse a format like this in the message set in wmb 6.1?
If they just had swapped the XXXXYYYY fields then it would be not problem. But what if the length element is placed before the tag?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jan 28, 2011 2:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

How did you try and model it?

I'd think something like
Code:
complexType DataElementSeparation="FixedLength"
     element name="Length" type = integer;
     complexType DataElementSeparation="TaggedFixedLength" composition="choice"
        element name="A" Tag="A" lengthReference="Length"
        element name="B" Tag="B" lengthReference="Length"
        element name="C" Tag="C" lengthReference="Length"
        element name="D" Tag="D"  lengthReference="Length"


But then I guess I haven't double-checked if there are rules on using the same field for a length reference for more than one element.

You'd then create a repeating element of that outer type as the only child of your message.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Jan 28, 2011 3:10 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Please can you give some more examples, with real data. Problems like this always require knowledge of the itty-bitty details.
Back to top
View user's profile Send private message
farbman
PostPosted: Fri Jan 28, 2011 4:47 am    Post subject: Reply with quote

Newbie

Joined: 19 Sep 2008
Posts: 8

I think that I can use the same data as found on http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ad09830_.htm to illustrate the problem better.

Code:
007tagAdataAAA006tagBdataBB009tagCdataCCCCC


007,006,009 = Length of data element
tagA,tagB,tagC = Tag identifier
dataAAA,dataBB,dataCCCCC = element data

Actually this time I only read in every record and manually handle it in the jcn, just because I could not figure out how/if it could be solved in the message set.
It is possible to use the data element length as length reference for the data element. But another fun fact is that I need to identify the tag so the mapping could be dealt with.

I think that jeffs idea above might work. I will try it out.
Back to top
View user's profile Send private message
farbman
PostPosted: Fri Jan 28, 2011 4:59 am    Post subject: Reply with quote

Newbie

Joined: 19 Sep 2008
Posts: 8

That solution did work excellent
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jan 28, 2011 5:23 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

farbman wrote:
That solution did work excellent


As kimbert said, though, there may be itty-bitty details that will come back later and cause issues. So go through a number of rigorous test cases and validate the model against the actual data definition.
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 » tagged encoded length elements
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.