The following are special considerations when using the INVITE
keyword:
- An input operation sent to a specific device does not require an
invite. Input operations with a specified record format name or device
are directed to one device. If that device has an invite outstanding at
the time of the input operation, the invite is deleted after the input
operation is completed.
- Once an invite has been sent to a device, the only valid operations (in
addition to a read from invited devices) are the following:
- An input operation to a specific device.
- An output operation with data that tries to cancel the invite. If
the cancel is successful, the data is written. If INVITE was in effect
on the output operation, the device is invited again. If the cancel is
not successful (because the data has already been received by the system), the
output operation fails. Your program must perform an input operation to
process the data. The input operation erases the invite for that
device.
- On a read from invited devices operation to a display file, only data from
devices with an outstanding invite are considered. The input operation
waits for data from any of the invited devices. (See the WAITRCD
parameter on the Create Display File (CRTDSPF) and Change Display File
(CHGDSPF) commands.) If none of the invited devices responds before the
wait time ends, a notify message is sent and no data is returned. All
invited devices remain invited.
- If more than one device acquired to the display file has an invite
outstanding, a read from invited devices operation returns the next available
record from one of the invited devices. If records are received from
more than one device before this input operation, the other records are kept
for subsequent input operations.
- When a read from invited devices operation to a display file returns a
record to your program from an invited device, the invite for that device is
deleted. Other devices that have an invite outstanding remain
invited. The device that sent the record your program read must be
invited again if you want to receive data from this device on a later read
from invited devices operation.
- If no device was invited or if a device was invited but the job was
canceled with the controlled option, a read from invited devices operation to
a display file results in a notify message and no data is returned to your
program. All invited devices remain invited.
- If you want to invite a device but have no data to send it, issue an
output operation using a record format containing no output-capable fields
with INVITE in effect.
- After the first record is received from an invited display device, the
device should not be re-invited until all the record formats on the display
with input-capable fields are read by your program. Your program can
read those other record formats if you specify the record format name and the
device name on the read operation.
- If your display file has the delayed write option (DFRWRT(*YES) parameter
on the (Create Display File (CRTDSPF) and Change Display File (CHGDSPF)
commands), an output operation with the INVITE keyword in effect causes the
delayed output to appear on the display before the device is invited.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.