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 » Fixed Lenght Message Set

Post new topic  Reply to topic
 Fixed Lenght Message Set « View previous topic :: View next topic » 
Author Message
pauln
PostPosted: Fri Nov 02, 2012 12:33 pm    Post subject: Fixed Lenght Message Set Reply with quote

Newbie

Joined: 02 Nov 2012
Posts: 3

Hi,

I need to parse a message where all feilds are fixed but the last feild is vaiable length.

Message Example

AAABBBCCCDDD

Feild1 = AAA (3 Chars Fixed length)
Feild2 = BBB ( 3 Chars Fixed length)
Feild3 = CCC ( 3 Chars Fixed length)
Feild4 = DDD( Variable Chars length it may avry from 3 chars to 30 chars)

How do I define this find of message set.I tried defining fix length message set but it fails when the last field is less then 30 chars) as I defined the Feild4 as 30 chars(maximu chars).

Help would be higly appreciated.

Thanks
Paul
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Nov 02, 2012 12:38 pm    Post subject: Re: Fixed Lenght Message Set Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pauln wrote:
How do I define this find of message set.


You'd define this find of message set by setting Feild4 to be the length of the bitstream between the end of Feild3 and the end of the bitstream. It's a dropdown on the definition.

pauln wrote:
Help would be higly appreciated.


You'll find the InfoCenter a much faster source of assistance than posting for basic questions. Or even just experiementing.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Nov 02, 2012 2:30 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If using v7 and the MRM parser, you can use Variable Length Elements Delimited on the complex type, and set the length to 0 on the final element.

If using DFDL ( v8 ) you can specify lengthKind='explicit' for the first three fields, and lengthKind='endOfParent' for the final field.
Back to top
View user's profile Send private message
pauln
PostPosted: Sat Nov 03, 2012 10:16 am    Post subject: Thanks Kimbart Reply with quote

Newbie

Joined: 02 Nov 2012
Posts: 3

Kimbart,

Thank you the soulution worked for me.

Regards,
Paul
Back to top
View user's profile Send private message
pauln
PostPosted: Sat Nov 03, 2012 10:27 am    Post subject: For Vitor Need more info Reply with quote

Newbie

Joined: 02 Nov 2012
Posts: 3

Hi Vitor,

Thank for your reply. I could not implement your suggestion. I am using WMB 7.01..Not sure of the solution you suggested is available in that version of WMB.

This is what I tried to do.

I created Message and Message defition.I defined a complex type with fixed length.Then I defined local element filed1 to field 3 fixed lenght assigned the leght but fouth field4 I could not find bitstream in the properties.Can you please give more details steps for creating the message set/def you suggested.

I could not find this "setting Feild4 to be the length of the bitstream between the end of Feild3 and the end of the bitstream. It's a dropdown on the definition."

"


Regards,
Paul

Thanks
Paul
Back to top
View user's profile Send private message
Vitor
PostPosted: Sat Nov 03, 2012 6:38 pm    Post subject: Re: For Vitor Need more info Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

pauln wrote:
Hi Vitor,

Thank for your reply. I could not implement your suggestion. I am using WMB 7.01..Not sure of the solution you suggested is available in that version of WMB.


Yes it is; I have a message set in 7..0.3 currently which does this.

pauln wrote:
I could not find bitstream in the properties.Can you please give more details steps for creating the message set/def you suggested.

I could not find this "setting Feild4 to be the length of the bitstream between the end of Feild3 and the end of the bitstream. It's a dropdown on the definition."


I'm not really sure how much clearer I can be.

If @kimbert's equally valid solution is working for you, then go in peace and enjoy it.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Fixed Lenght Message Set
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.