Data Queues
The IBM® i operating system uses data queues to send data to the server program. The server program also uses data queues for interprocess communications with other IBM i applications and API calls.
The data queue must exist before your application uses the virtual terminal APIs to open a path to a virtual terminal. See the Control language topic collection for details about creating and deleting data queues. See Open Virtual Terminal Path (QTVOPNVT) API for information about how a server program specifies the name of the data queue to be used.
The operating system communicates special events to the server program using the data queue. The system provides information about the special events using a data queue entry.
The following events result in data queue entries being sent:
- The virtual terminal receives data from an IBM i application
- The operating system closes the virtual terminal (This occurs when an application's job is canceled.)
The following table shows the structure of IBM i data queue entries that
are sent to the data queue when an application uses the virtual terminal APIs.
All data queue entries have the same format.
Format for IBM i Data Queue Entries | ||
---|---|---|
Name | Type | Description |
Entry Type | CHAR(10) | Always set by IBM i to *VRTTRM. |
Entry ID | CHAR(2) | Entry ID associated with entry. Valid values for
the 2 characters in this parameter are:
|
VTHandle | CHAR(16) | The virtual terminal handle associated with the virtual terminal communications path previously opened by calling the Open Virtual Terminal Path (QTVOPNVT) API. See Open Virtual Terminal Path (QTVOPNVT) API for additional details. |
CHAR(52) | Reserved | |
Key | CHAR(*) | Key value specified when the virtual terminal
communications path was opened. See Open Virtual
Terminal Path (QTVOPNVT) API for additional details on specifying the key
value. The key value can be used for retrieving data queues by key. |