Using KSAM/XL and KSAM 64 (32650-90886)

78 Chapter9
KSAM Intrinsics
FCONTROL
2 I16 Complete I/O:
Ensures that requested I/O has been physically completed. Valid only for
buffered files. Posts the block being written (full or not).
Item
is ignored.
A checkpoint record is written. In the event of a system crash, recovery is
done to this state of the files.
3 U16 Device status:
Returns a record containing information about the state of the device
associated with the file immediately after the last I/O operation
(including HPFOPEN/FOPEN) on the file. The record size and contents are
device-dependent.
Not applicable to KSAM files.
4 U16 Set timeout interval:
Passes the timeout interval, in seconds, to be applied to input from the
specified file. The maximum value allowed is 655.35 seconds. If input is
requested from a file but is not received in this interval, the FREAD
request terminates prematurely with CCL. The interval is specified in
seconds and returned in
item
. If this interval is zero, any previously
established interval is cancelled, and no timeout occurs.
A timeout value should be used for programs reading from an
unattended device to prevent "hangs". Timeouts can be used to terminate
binary reads, but only as a safeguard to prevent a program from waiting
too long for a read to complete.
Only valid for terminal and message files. Only affects the next read if
the addressed file is being read from the terminal; it must be reissued for
each read. If this code is applied to a message file,
item
specifies the
length of time that a process waits when reading from an empty file or
writing to a full one and the timeout remains enabled until it is explicitly
cancelled.
Denotes a halfword in the stack that contains the time-out interval, in
seconds, to be applied to input from the terminal.
During block mode reads, the timer halts when a DC2 character is
received. The block mode read timer is activated by the system software;
these values are not user changeable.
Not applicable to KSAM files.
5 U16 Reposition file at its beginning:
The file is repositioned to the first logical record, the record with the
lowest value in the current key.
Table 9-1. FCONTROL Itemnum/Item Values
Itemnum Mnemonic Item Description