With the KDCOUT command, the user can request the output of asynchronous messages. At generation time, the ANNOAMSG={ YES | NO } operand in the LTERM or TPOOL statement defines how openUTM is to output asynchronous messages to this terminal (LTERM) or LTERM pool (TPOOL).
Output with ANNOAMSG=Y
In this case, openUTM announces asynchronous messages with the following UTM message:
K012 nnn asynchronous message(s) present
The UTM message appears in the system line together with a dialog output at this terminal. The number of asynchronous messages is specified with nnn. The user can retrieve these messages using the KDCOUT command. If there are no messages for the terminal when KDCOUT is entered, openUTM outputs the UTM message:
K020 No message(s) present
When an asynchronous message is retrieved with KDCOUT, it is deleted by the next input, except when KDCLAST is entered (see "KDCLAST - repeat the last output").
If the user is in a format-driven dialog with a service and outputs an asynchronous message with KDCOUT, the last output format is thereby destroyed. To continue the service, the user must redisplay the output format with the user command KDCDISP (see "KDCDISP - output the last dialog message"). If this is not done, openUTM automatically executes a KDCDISP. The user must then repeat the input.
The result of the KDCDEF statement LTERM ..., RESTART= NO is that any pending asynchronous messages are deleted when the connection is set up or shut down to this LTERM partner.
The function variants of openUTM have the following effects on the handling of asynchronous messages:
With UTM-S applications, asynchronous messages are logged even if the application run is interrupted and are retained until retrieved with KDCOUT.
With UTM-F applications, asynchronous messages are only stored during the application run. They are lost when the application run terminates.
Output with ANNOAMSG=N
If a client is connected to an LTERM partner generated with LTERM...,ANNOAMSG=N or TPOOL ...,ANNOAMSG=N, the KDCOUT command is not permitted on this client. ANNOAMSG=N means that openUTM outputs asynchronous messages immediately at the terminal, i.e. without prior announcement. openUTM therefore rejects the KDCOUT command at this terminal with UTM message K003:
K003 Command KDCOUT is not permitted at this time.
In a UTM application with user IDs, asynchronous messages are output at the earliest after the sign-on check has been concluded successfully.
If you want to continue your dialog with the application after the asynchronous message has been output, the screen of the last dialog output must be requested beforehand with KDCDISP. Otherwise, openUTM executes an automatic KDCDISP. This automatic screen restart is only suppressed by openUTM if the asynchronous message was output with the same format as the last dialog output.