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 » TDS or CWF

Post new topic  Reply to topic
 TDS or CWF « View previous topic :: View next topic » 
Author Message
KIT_INC
PostPosted: Fri Mar 21, 2008 8:23 pm    Post subject: TDS or CWF Reply with quote

Knight

Joined: 25 Aug 2006
Posts: 589

I have to model a message which looks like
Header Header_data DataA DataB DataC.....DataA DataB DataC Trailer Trailer_data

There is no space between each field. The space is used here to make it easier to read.
All fileds (like Header Header_data DataA DataB DataC Trailer Trailer_data) are fixed length
DataA DataB DataC can repeat many times. I do not have the number of repeat ahead of time.

For example
HHH12345aaaaaabbbbbbbcccccccc.....* please do not use *...xxxxxxyyyyyyyzzzzzzzzTTT6789

HHH12345 HeaderHeader_data

aaaaaabbbbbbbcccccccc.....* please do not use *...xxxxxxyyyyyyyzzzzzzzz are repaeating DataA DataB abd DataC

TTT6789 TrailerTrailer_data

I like to model this using TDS. But the repeating data between the header and trailer has no tag. Can this be done or I should try using CWF. But I cannot tell the repeat count ahead of time. I am new to this. I just want your advice on which format is better or easier for this type of message.
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Sat Mar 22, 2008 1:05 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi KIT_INC,

You can use TDS and use 'Fixed Length' in that too, so delimiter would not matter....rest you already know I guess.

Regards.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Sun Mar 23, 2008 4:12 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You'll need TDS, and you will need to use data patterns. Try this:


Code:
Element Header   
   Local complex type DES='Tagged Fixed Length' Tag='HHH'
      HeaderData Length=5
Group Composition='choice' DES='Tagged Delimited' Tag Length=0 maxOccurs='-1'
   Group   DES='Use Data Pattern'
      Element Trailer Data Pattern='TTT.{4}'
         Local complex type DES='Tagged Fixed Length' Tag='TTT'
            TrailerData Length=5
   Element DataABC
      Local ComplexType DES='Fixed Length'
         DataA   Length='?'
         DataB   Length='?'
         DataC   Length='?'
The keys to this are:
- You need 'Use Data Pattern' to distinguish between Trailer and DataABC
- You don't want to write a data pattern to describe the whole of DataABC. That's why the choice group has DES='Tagged Delimited', not 'Use Data Pattern'

That second point may need an explanation. When a data pattern matches the bitstream, the matching portion of bitstream is extracted and used in the parsing of the element/group. So it would be no use writing a data pattern such as '[~T]' ( not 'T' ) for DataABC. That would only match a single character, and the subsequent parsing of DataABC would run out of bitstream and fail.
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 » TDS or CWF
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.