Use this file- or record-level keyword to invite the device for a later read operation.
To send an invite to a specific device, your program sends an output operation to the device with the INVITE keyword in effect. If the record format used has output-capable fields, the data is sent to the device before the device is invited.
This keyword has no parameters.
INVITE must be used if the display file can have multiple acquired devices and your program does read from invited devices operations. This is because a read from invited devices to a multiple device display file only returns a record from one of the devices that was invited. If you want all the acquired devices to be able to return data, an output operation with INVITE in effect must be sent to each device before the read from invited devices. Even if there is only one device acquired on the multiple device file, the device must be invited via INVITE before a read from invited devices.
INVITE also gives you the ability to create a subset of acquired devices that are eligible to respond on a read from invited devices. For example, if ten devices are currently acquired to the file but only three devices were invited, the next read from invited devices operation returns a record from one of the three invited devices. This is true even if the other devices have data available.
INVITE provides some performance improvement. Normally a read request is issued to a device when your program sends an input operation. However, INVITE allows you to request the read when you issue the output operation. After the output operation is complete, your program can do other processing while the device is issuing data and the i5/OS™ operating system is processing the received data. This can be a significant improvement if the device is remote.
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.
The following example shows how to specify the INVITE keyword.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A 01 INVITE 00020A R RCD1 00030A FLD1 10 2 2 00030A FLD2 5 2 24 A
INVITE is in effect only when option indicator 01 is set on.