View previous topic :: View next topic
|
Author |
Message |
krishna_ragav
New User
Joined: 29 Oct 2010 Posts: 10 Location: Chennai
|
|
|
|
Hi all,
I have a field
Field1 W 03 A
There may be a case that Field1 contains
Field1 = '_XX' or
Field1 = 'XX_' or
Field1 = 'X_X' or
Field1 = '___' or
Field1 = 'X__' or
Field1 = '__X' or
Field1 = 'ABC'
X can be spaces. ABC is a valid value.
I have to check a condition where Field1 may consist of underscore in any of 3 position. That is i have to perform something in first 6 situations when Field1 contains underscore.
How to check it in easytrieve. Please help.
Thanks in advance.
Ashirwad |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
What did you try yourself. It could be done by indexing or redefines.
Everything can be found in the manual. Or do you want me to write your code? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
To add to Peter's advice, and you'll probably still have to look at the manual, so make sure you cover everything...
I would do this by defining an "instream table" with the possible values for your combinations of space and underscore.
To check for one of those values, you'd "search" the table. If present on the table, then you have your condition for processing the field with underscores.
Read the manual. Code it up. Run it. If you can't get it to work, post the code and the evidence of the problem. Explain how else you could do it from your reading of the manual... |
|
Back to top |
|
|
|