|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Regular Expressions in ESQL (WMQSI 2.1) |
« View previous topic :: View next topic » |
Author |
Message
|
Kool-Aid |
Posted: Thu Aug 19, 2004 10:51 am Post subject: Regular Expressions in ESQL (WMQSI 2.1) |
|
|
 Novice
Joined: 22 Apr 2004 Posts: 22
|
I am trying to complete a simple IF test that evaluates a field. The field will always end with the last digit ranging from 0 to 9.
For example, the field E1MBXYH00[0-9] could be...
E1MBXYH001, or E1MBXYH004, or E1MBXYH009, or E1MBXYH000
How do I set a range for the field so I don't have to write out each possible value?
Sample of my current code below (as you can see I am stuck):
IF ("InputBody"."WMMBID02"."IDOC"."EDI_DC40"."E1MBXYH"."SEGNAM" = 'E1MBXYH00?') THEN
SET "HoldLabel" = 'Goods Reciept';
END IF |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Aug 19, 2004 11:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This isn't directly supported.
Since you're testing the value, you could do something like
Code: |
IF (SUBSTRING("InputBody"."WMMBID02"."IDOC"."EDI_DC40"."E1MBXYH"."SEGNAM" from 1 for 10) = 'E1MBXYH00') ) |
_________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
TDS_tds_tds |
Posted: Thu Aug 19, 2004 12:51 pm Post subject: |
|
|
 Novice
Joined: 31 Jul 2003 Posts: 16
|
if you just want to compare the last character then easy way is :
pseudo code :
IF substring("InputBody"."WMMBID02"."IDOC"."EDI_DC40"."E1MBXYH"."SEGNAM" from 10 for 1) IN ('0','1','2',........'9') then |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|