View previous topic :: View next topic
|
Author |
Message |
glsudhir
New User
Joined: 08 May 2006 Posts: 3
|
|
|
|
Hi,
I have the following requirement, any suggestions would be greatly appreciated.
Case 1:
NAME1 - <TOWN OF LANGLADE>
NAME2 - <FIRE DEPARTMENT>
NAME3 - <TOWN OF LANGLADE FIRE DEPARTMENT CLAUDIA CLERK>
Case 2:
NAME1 - <TOWN OF LANGLADE>
NAME2 - <FIRE DEPARTMENT>
NAME3 - <TOWN OF LANGLADE FIRE DEPARTMENT CLAUDIA CLERK>
Case 3:
NAME1 - <TOWN OF LANGLADE>
NAME2 - <FIRE DEPARTMENT>
NAME3 - <TOWN OF LANGLADE FIRE DEPARTMENT CLAUDIA CLERK>
My requirement is to exclude the values of NAME1 & NAME2 from NAME3 and get the string "CLAUDIA CLERK" only.
Note : 1)NAME3 may have NAME1 & NAME2 values only. In this case the output should be spaces
2)NAME3 may have either of NAME1 or NAME2.
3)NAME3 may have more than one space between the NAME1 and NAME2 values.
4)NAME3 may have more than one space between the NAME2 and the required string.
Thanks In Advance,
Dheeraj |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Wouldn't that just be something like
unstring name3 delimited by name1 or name2 or spaces into final-area? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
There is only one case visable (i only see one set of data erpeated 3 times - unless there are embedded spaces that the system automagically deleted)? If you need to show embedded blanks, using the "Code" tab near the top of the Reply panel will keep multiple spaces intact.
What is the rule if name1 and name 2 "overlap"? What if name1, name2, or both is "empty"?
How many "nodes" might any of the names contain? Is there a limit? The example shows 3 & 2.
I believe you will need a bit more code than just an unstring. . .
If you post all of the rules, we may have suggestions. |
|
Back to top |
|
|
glsudhir
New User
Joined: 08 May 2006 Posts: 3
|
|
|
|
Hello Dick,
What is the rule if name1 and name 2 "overlap"? What if name1, name2, or both is "empty"?
Comment: No overlapping and will exist atleast one Name field
How many "nodes" might any of the names contain? Is there a limit? The example shows 3 & 2.
Comment: yes, it may have 3 or 2 or 1.
Thanks in Advance,
Dheeraj[/code] |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Like William said,
unstring name3 delimited by name1 or name2 or spaces into final-area
should work, maybe multiple with multiple final-areas...
Give it a try, experiment with the CLAUDIA CLERK in different positions...... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If name1 or name2 has a different number of embedded spaces between nodes than there are embedded spaces between the correcponding nodes in name3, i believe the unstring will not work as wanted.
As CG suggests, and as William suggested, give it a try.
We'll be here when there are questions. |
|
Back to top |
|
|
glsudhir
New User
Joined: 08 May 2006 Posts: 3
|
|
|
|
Thank you guys, I'll give a try and appreciated all, for your support and help.
Dheeraj |
|
Back to top |
|
|
|