Using the proscopn(), prosccls(), and promsgd() functions
In character mode, OpenEdge typically uses raw terminal I/O, but supplies HLC library functions for switching between raw and cooked mode. Ideally, leave the terminal set to raw mode and use the promsgd() function to display information to the user. This provides a uniform appearance for messages.
If necessary, you can use cooked mode for handling the screen display in character mode. In this case, use the proscopn() function to enable cooked mode. Before returning to OpenEdge, re-enable raw mode with a call to prosccls().
In character mode, the promsgd() function displays up to two messages before displaying a "Press space bar to continue" status message. In raw mode, the user can press SPACEBAR as prompted. In cooked mode, the user must press RETURN after promsgd() displays the status message. To use promsgd() in cooked mode, use the ABL PAUSE statement to change either the status message or the way the user interacts with the display.
For example, to change the status message to tell the user to press RETURN, place the following PAUSE statement anywhere before the first HLC call that invokes promsgd():
PAUSE BEFORE-HIDE MESSAGE "Press [RETURN] to continue"
...
CALL HLC-MESSAGE-ROUTINE.
To cause the display to change two seconds after displaying a message without user input, use the following statement:
In this case, you must specify the interval to pause. See the PAUSE Statement reference entry in OpenEdge Development: ABL Reference for more information.
Run the HLC demo application to see examples that include a number of promsgd() calls illustrating these techniques.
In graphical interfaces, promsgd() displays messages in an alert box. Raw and cooked terminal I/O, and the proscopn(), proclear(), and prosccls() functions apply only to OpenEdge running in character interfaces.