Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)
162 Chapter8
Intrinsics Reference
FCONTROL
FCONTROL
Performs control operations on a file or a device.
Syntax
I16V I16V *
FCONTROL(filenum,controlcode,param);
Use
The FCONTROL intrinsic performs various control operations on a file
or on the device on which the file resides. It applies to files on disk and
tape as well as to files on terminals and printers. The controlcode
parameter determines the action taken by the FCONTROL call.
The following pages describe the use of the FCONTROL intrinsic for
control of asynchronous devices. Chapters 3 and 4 also include
discussions on FCONTROL. For a complete explanation of FCONTROL
functions for disk and tape files, refer to the MPE/iX Intrinsics
Reference Manual.
The characteristics that define the relationship between a specific
asynchronous device and the MPE/iX system are initially set through
system configuration or through the configured terminal or printer type
of the device. When you issue calls to most of the FCONTROL
functions, you are temporarily changing the operating characteristics of
the device on which the file (specified in filenum) resides.
An exception to this applies to calls to FCONTROL using controlcode
25 through 29. These calls affect only the file specified in the filenum
parameter of the call. They do not affect the operating characteristics of
the device itself or any other files that might be opened against the
same device.
You will generally need to issue several calls to FCONTROL, each
specifying an appropriate controlcode, to set up the combination of
device characteristics that your program requires. However, for most
controlcode values, you only need to issue one call for a specific
characteristic to be in effect for all files opened against a device.
Exceptions to this include the following.
Controlcode 4 sets a read timeout value for the next read (timeout
value), and controlcode 22 returns the time taken for the last read to
your program. Each of these timer functions, if desired, must be issued
for every read.