While not too sure if this is available in RPG400 it was in earlier versions. We output a format with a special name of '$$TIMER' and as the first data string pass 'mmss' which represents the decimal value of minutes and seconds before the timeout occurs.
This actually starts a time withing workstation data management and when the timer expires control is returned to your program with a particular return code value. Then, in the INFSR, you can check for the code and do what ever you wish. We end the program which causes a return to the menu.
Good luck