troubleshooting Question

Creating an Searchable field in RPGIV?

Avatar of wendelina
wendelina asked on
Operating SystemsDB2IBM System i
28 Comments1 Solution534 ViewsLast Modified:
Hi,
I am faced with a request I don't quite know how to handle.  First let me say that to my regret, we are NOT using SQL on our 400.  That said, our solution must then be confined to native DB2 and/or RPGIV.  

Here is the scenario:  I have a history file that contains a 35 character name field.  The users can currently search the name field for strings of characters, left to right.  If a name is entered as Tom L Smith, the users will have to enter "Tom" to find this record.  Behind the scenes, the search is simply positioning a logical file that is sequenced by that particular field.

What the request is, is to allow the users to key in a word within the field, such as Smith, and have it return all the records that contain the word Smith.  

A suggestion to me has been to write a program to build an index file that contains a record for every word that occurs in every name field - which I can kind of conceptualize but before I start down that road, I want to make sure I have considered every option.  Does anyone have any suggestions that may be simpler?  

Thank you

ASKER CERTIFIED SOLUTION
Theo Kouwenhoven
Application Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 28 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 28 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros