Hi
I have a input str OPT_STRING="AN3 AY1 B34 B35 C67 DG7 FE1 FE9 FQ3 IKC JB9 JL9 KG7 K05 LZ4 MX0 M15 NK5 NT7 NW9 OSH QB5 QPX UE0 UW6 U1C U19 U2E U77 VC5 VH9 VS7 V73 WD1 WD2 WD7 Z49 1SB 19C 19I 40U 6HM 7HM 8MZ 9MZ"
Now the requirement is:
IF Option code VN9 or VNL exists in the source field OPT_STRING send 'X' else send blank
Note: There is a space between any two option code in the input string i.e.
AN3 AY1, after 3 there is a space.
How to search VN9 and VNL within the input string OPT_STRING?
How to search for a specific string within an input string
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
An even more cunning plan - one that cannot fail - is to search for the delimited string.
Code: Select all
If Index(" " : OPT_STRING : " ", " " : OptionCode : " ", 1) Then "X" Else " "
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: