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?