For specific instructions on when an invite operation is necessary and how to
specify a read from invited devices operation in your program, see the appropriate
high-level language manual.
INVITE cannot be specified at both the file and record level and cannot be
specified with the subfile keyword (SFL).
Option indicators are valid for this keyword.
Special Considerations for Display Files
The following are special considerations when using the INVITE keyword:
v 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.
v 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.
v 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
v 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.
v 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.
v 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.
v 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.
v 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.
Display Files, INVITE
OS/400 DDS Reference V4R5