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 » Query on Data Patterns

Post new topic  Reply to topic
 Query on Data Patterns « View previous topic :: View next topic » 
Author Message
kash3338
PostPosted: Mon Feb 01, 2010 4:05 am    Post subject: Query on Data Patterns Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Hi,

I have a scenario wherein i would be getting a variable length message as input and the message will contain String, Integer and Decimal values as a part of it.

I have created a message set for the same using Data Patterns and set the value of Data Pattern as "[A-Z a-z 0-9]*". Now when i test it with just String and Integer values, it works fine, but when i include a Decimal value in my input message, there is a parser error. How do i modify the Data Pattern value such that it accepts Decimal values as well?

- Kashyap.
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Mon Feb 01, 2010 4:32 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I have a scenario wherein i would be getting a variable length message as input and the message will contain String, Integer and Decimal values as a part of it.
I assume that this is a TDS message, but you don't actually say that.
Please can you provide an example input message - it makes it so much easier to discuss the details.
Quote:
I have created a message set for the same using Data Patterns
Can you explain why you are using data patterns? Is it not possible to use All Elements Delimited or Tagged Delimited?
Quote:
Now when i test it with just String and Integer values, it works fine, but when i include a Decimal value in my input message, there is a parser error.
C'mon. We're not mind-readers. Please quote the full text of the error message. If necessary, take a user trace - but the full text should be in the Windows Event Viewer if you're on Windows.
Quote:
How do i modify the Data Pattern value such that it accepts Decimal values as well?
Well, one difference between Decimal and Integer is that Decimal can contain a decimal separator ( e.g. decimal point or comma).
Back to top
View user's profile Send private message
kash3338
PostPosted: Mon Feb 01, 2010 4:50 am    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

It is a TDS message set. I use Data Patterns because, this is a Variable length message and there is no delimiter for this as well, hence i cannot go with All Elements Delimited.

Also, i do have to select a particular Complex Type based on the first 5 bytes which can be acheived easily by using Data Patterns.

Sample Input Message : Rd001MyNameMyEmpNo12345Price100.00TotalCost2000.00

The above mentioned would be the structure of my input, where in the first five bytes determines the complextype and rest is data.

My doubt is, to accept the decimal values i need to specify the decimal point in the data patterns, how do i do that?
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Mon Feb 01, 2010 5:40 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

kash3338 wrote:
My doubt is, to accept the decimal values i need to specify the decimal point in the data patterns, how do i do that?


In the manner specified in the documentation... ? Did you try the obvious thing of just putting in a "."?

Even variable-length, undelimited message can be parsed in TDS without using data patterns. Tagged-Fixed Length works great if you have fixed-length records, even if the whole message is variable length.

If you don't even have tags, then you probably do have to use Data Patterns.
Back to top
View user's profile Send private message
kimbert
PostPosted: Mon Feb 01, 2010 5:51 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
i do have to select a particular Complex Type based on the first 5 bytes which can be acheived easily by using Data Patterns.
...and even more easily using Tagged Delimited or Tagged Fixed Length.

You may not realize this, but you can use different Data Element Separation settings in the same message model. You could use Tagged Delimited to select the appropriate complex type and then use 'Use Data Pattern' ( if you really need to ) to parse the complex type itself.
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 » Query on Data Patterns
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.