EGL provides a library and Record definitions to communicate
with data queues and data areas on IBM i.
The IBM i operating system
has its own API to handle program-to-program
communication. The communication can take place through one of two
objects:
- A data area is a fixed-size object that
any job running
on the system can read from or write to. Think of it as a virtual
whiteboard. You can set it up to contain one of the following kinds
of data:
- A character string of up to 2000 bytes
- A decimal
number
- A Boolean value (TRUE or FALSE)
- A data
queue is a variable-length object that can
hold any number of messages from any number of jobs. Data queues are
similar to WebSphere® MQ
message queues.
A data area has lower overhead than
a data queue, so your choice
of which object to use generally depends on the complexity of your
task. You might use a data area, for example, to hold a flag that
lets one program tell another to perform garbage collection. A data
queue scenario is typically more complex, as in the following example:
- One application listens for a specific type of request. For each
request, it creates a record and adds that new record to the queue.
- Other applications listen for new records created by the first
application. One uses the record to update a database. Another uses
the same record to generate an invoice.
EGL supports
these iSeries® objects
in two ways: