So I'm working on implementing an auto-complete search bar and integrating it with an RPG and Assembly system using DB2. I have tried these two techniques to search for distinct IDNumbs from a file, where the input requires at least 3 numbers before the search takes place. I have tried the following:
Regular expression example: ^[0-9]*$
SQL
SELECT DISTINCT [IDNUM] FROM FILE WHERE [iNPUT] > 3;
Unfortunately neither technique works accurately. I'd love it if someone had some advice on how to make it more robust. An RPG solution is welcomed as well but an SQL one would be great.