Previous Topic

Next Topic

Book Contents

Book Index

Exchanging Messages

KOA expects to receive a screen (information) back from a VTAM application each time a screen is sent to the application. This implied send and receive method of exchanging information is the default method of communication between KOA and VTAM. This means that whenever a screen is sent to the VTAM application (such as through ENTER, ATTN, CLEAR, or PFxx), KOA automatically performs a receive operation in order to receive an updated screen from the application. (Note that the same process is automatically performed after the logon process completes.) From the point of view of the script, the current screen is the application’s response to the previously sent screen.

To eliminate the implied receive and override the default method, command SCREENMODE NORECEIVE should be used (the default is SCREENMODE RECEIVE). In NORECEIVE mode, KOA does not wait for responses from the VTAM application, and the script continues processing. When operating in NORECEIVE mode, KOA command GETSCREEN should be specified in order to receive a message from the VTAM application.

The KOA default method of exchanging information ensures that, at any stage, the script operates on a screen that is ready to receive input (that is, the VTAM application is waiting for input). For example, when a user communicates with an application, the keyboard is always unlocked (reset) so the user can enter data. KOA scripts must operate under similar conditions. To guarantee these conditions, KOA repeatedly receives messages from the application – until a message is received indicating that the application is now waiting for input from the LU.

Some situations require a different method of exchanging information. For example, a KOA script can determine independently if or when to send data to – or request additional messages from – the VTAM application. This method may be required for situations where the application sends messages at fixed intervals, without first unlocking the screen. To choose this mode of information exchange, command SCREENMODE ANY should be used (the default is SCREENMODE UNLOCKED). More complex KOA scripts must be written to facilitate this method of exchanging information.

When the current KOA SCREENMODE is ANY, a message may not be "sendable" to the application because the screen (keyboard) is locked. A user at a terminal, in this situation, simply presses the attention key and waits until the keyboard is unlocked. In KOA, command ATTN sends an attention request to the application, and receives an unlocked screen from the application.

Parent Topic

KOA Implementation Considerations