When the application runs as a service in an enterprise server, any ANSI ACCEPT or ACCEPT FROM COMMAND-LINE statements that are not mapped to interface fields return spaces, and any ANSI DISPLAY statements or RETURN-CODE values that are not mapped to interface fields are ignored. Any screen or keyboard operation other than an ANSI ACCEPT, ACCEPT FROM COMMAND-LINE or ANSI DISPLAY will generate the run-time system error 197 and the application will be terminated.
A service can also issue ACCEPT FROM CONSOLE and DISPLAY UPON CONSOLE statements. When execution reaches a DISPLAY UPON CONSOLE statement, the display text is displayed in the enterprise server console log, and the service continues. When execution reaches an ACCEPT FROM CONSOLE statement, the service pauses and asks for input using pages in ESMAC.