I have a typical screen with about 10 fields. The first 4 fields need to be validated against some tables. Each field should chain to a file and if the chain is %FOUND then it should continue to the next field, but at the present it doesn't. I can do the typical CHECK keyword and validate against ranges, etc, but I need a bit more with these 4 fields.
I need to enter a value, press enter, having the value chain against a table, return to the screen and not let me continue to enter more data until the field has valid data. If the data is invalid because the data was not found, I want to stay on the field until valid data is entered and validated against a table or F3 or F12 is entered to completely exit.
Right now,I am entering data, pressing enter and putting in dummy data into the table if the user entered invalid data. This was fine for a bit until the amount of data grew too much.
I tried "repainting" the screen after I pressed enter to return control to the program which validated and then "repainted" the screen again to show results; however, this started getting out of control and the code turned into a mess.
I know this can be done, but how?
Any advice is greatly appreciated.
I need to enter a value, press enter, having the value chain against a table, return to the screen and not let me continue to enter more data until the field has valid data. If the data is invalid because the data was not found, I want to stay on the field until valid data is entered and validated against a table or F3 or F12 is entered to completely exit.
Right now,I am entering data, pressing enter and putting in dummy data into the table if the user entered invalid data. This was fine for a bit until the amount of data grew too much.
I tried "repainting" the screen after I pressed enter to return control to the program which validated and then "repainted" the screen again to show results; however, this started getting out of control and the code turned into a mess.
I know this can be done, but how?
Any advice is greatly appreciated.
Comment