ZCOM Subsystem

ZCOM Concepts

are maintained automatically by the ZCOM Subsystem. When a message is sent to a ZLU, the data is moved to a system buffer first and the address of the message is moved to the attached input queue.

Program ZLUs

Each program may open one or more program ZLUs which provides an input message queue to that program. Think of a program’s input message queue as a mailbox where messages can be delivered. All messages delivered are queued at the end of the input queue for a program in the order in which they were received. Note that the message is not actually delivered to the program, but simply placed into the input queue. The program must issue a ZCOM library call to retrieve the messages one-by-one from the input queue. The method used to cause a message to be placed into a program’s input queue will be different depending on whether the message was created by another program or a physical/logical device.

If a message is sent (generated) by another program, then the sending program must specify the ZLU of the program’s input queue to place the message into. The receiving program need not do anything for the message to be successfully delivered to their mail box (program input queue).

However, when a message is generated by a terminal ZLU, any program that wishes to receive messages from that device (terminal ZLU) must inform the ZCOM Subsystem first. The program should issue a ZCOM call (zset_rcvr) to tell the ZCOM Subsystem that all data coming from the specified terminal ZLU should be delivered to its input queue. Whenever data arrives from the device, it will be placed into the input queues of all programs that have requested this data.

Terminal ZLUs

Terminal ZLUs represent a physical or logical device and do not have input queues of their own. Any data coming from a terminal ZLU will be delivered to the input queues of all applications that have requested it. If there is no application interested in receiving the data, then the data is thrown away and a message is logged to that effect.

Terminal ZLUs do however have three different output (transmit) queues. When a program sends data to a terminal ZLU, it can select one of three queues to place that data on. Each queue represents a different

Chapter 1

19