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 » ESQL

Post new topic  Reply to topic
 ESQL « View previous topic :: View next topic » 
Author Message
SOLOHERO
PostPosted: Tue Apr 03, 2007 9:19 pm    Post subject: ESQL Reply with quote

Centurion

Joined: 01 Feb 2007
Posts: 107

how can i restrict a string length in esql.


eg. I want the input message comming should be of length on 4 chars if it is more than 4 i should throw an error.
_________________
Thanks
Back to top
View user's profile Send private message Send e-mail
sarat
PostPosted: Tue Apr 03, 2007 9:56 pm    Post subject: Reply with quote

Centurion

Joined: 29 Jun 2005
Posts: 136
Location: India

Yo u want to check the particular filed or entire message length?


Take a look at LENGTH function!!!!
_________________
With Regards,
Sarat.
Back to top
View user's profile Send private message
Mensch
PostPosted: Tue Apr 03, 2007 11:56 pm    Post subject: Reply with quote

Disciple

Joined: 17 Jul 2005
Posts: 166

Use LENGTH function or create message set
_________________
Thanks and Regards ,
Mensch
Back to top
View user's profile Send private message
SOLOHERO
PostPosted: Thu Apr 05, 2007 4:42 pm    Post subject: Reply with quote

Centurion

Joined: 01 Feb 2007
Posts: 107

tHANKS BUT

HOW DO I IMPLEMENT IT SAY

x=3124;

Length('x')

How can i restrict to 4 not greater /less than 4.

Thanks
_________________
Thanks
Back to top
View user's profile Send private message Send e-mail
fjb_saper
PostPosted: Thu Apr 05, 2007 5:20 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

SOLOHERO wrote:
tHANKS BUT

HOW DO I IMPLEMENT IT SAY

x=3124;

Length('x')

How can i restrict to 4 not greater /less than 4.

Thanks


In the MRM parser / message set:

First you need to set it up as String and not number or integer because it would strip leading zeros off numbers in xml serialization.
Second give it a facet of \d{4} and you should be done.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Apr 05, 2007 5:56 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

SUBSTRING.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Apr 06, 2007 3:29 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

'\d{4}' is pattern ( regular expression ). You don't need a Pattern constraint for this. Surprisingly, a Length constraint will do the job very nicely
Back to top
View user's profile Send private message
sarat
PostPosted: Sun Apr 08, 2007 10:13 pm    Post subject: Reply with quote

Centurion

Joined: 29 Jun 2005
Posts: 136
Location: India

Quote:
tHANKS BUT

HOW DO I IMPLEMENT IT SAY

x=3124;

Length('x')

How can i restrict to 4 not greater /less than 4.



If ur not going to sets...

U can check....

IF LENGTH(x) = 4 THEN

u can use like this!!!
_________________
With Regards,
Sarat.
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 » ESQL
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.