In UniBasic I would make a dynamic array of all the possibilities then use MATCHES.
Example: * ** Do this in your init routine. * SEARCH.STRING = "" SEARCH.STRING<1, -1> = "...'MIL'..." SEARCH.STRING<1, -1> = "...'SPEC'..." SEARCH.STRING<1, -1> = "...'-14'..." ... * ** Use it like this. * IF UPCASE(PART.NBR) MATCHES SEARCH.STRING THEN ... Thanks, David A. Green www.dagconsulting.com (480) 813-1725 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Brutzman, Bill Sent: Friday, March 13, 2009 7:40 AM To: [email protected] Subject: [U2] - UniBasic String Search I need to examine fields for perhaps one thousand part.numbers looking for tech specs that contain character strings like "MIL" "Spec" "SPEC" "-14" etc While I can do this with commands like... execute 'SELECT IM WITH OP.SPEC LIKE "...-14..." ', this technique is awkward since I have a few dozen strings to look for... I have the IBM tech manual describing the MATCH operator and the MATCHFIELD function. Is there a handy UniBasic method to handle this or should I write a little program to do this myself? Fixes would be appreciated. --Bill ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
