1 Task
A program has to read data from the database and present these in a map. The data should be read again and presented in the same map after a certain period, So that the map displays the time varying data in a certain frequence. This can be accomplished utilising the non-conversational mode - statement SET CONTROL ‘N’ - and user exit USR2027 to wait a some seconds.
2 Problem
After the process is initiated the map cannot accept any user interaction because of SET CONTROL ‘N’. The task has to be terminated in order to finish the program - see appendix for sample.
3 Workaround
The only way to get the process stopped properly is to evaluate a database field as an indicator. The example shows how to get this done. Program BEISPIEL starts to display data in a certain frequency without user interaction. It cannot be stopped from the same task so it uses an indicator which has to be set from another Natural session executing program BSPEND.
4 Proposal
A task should be able to wait a certain time for some defined user interaction and should react on it if it happened. If not it should work as with SET CONTROL ‘N’. The sequence should be
- Wait for INPUT
- Was some INPUT entered?
Yes: Process the INPUT
No: Do the next non-coversational step - Go to 1
See download for example program
EP3272.txt (2.65 KB)