Asynchronous Serial Communications Programmer's Reference Manual (32022-90052)

160 Chapter8
Intrinsics Reference
FCLOSE
FCLOSE
Closes a file.
Syntax
I16V I16V I16V
FCLOSE(filenum,disposition,securitycode);
Use
The FCLOSE intrinsic terminates access to a file. You should make
sure your program issues an FCLOSE for every file it opens. If you have
opened multiple files against the same device, you should issue an
FCLOSE for each opened file before your program ends. If you should
fail to issue an FCLOSE, however, MPE/iX will automatically issue an
FCLOSE for any files left open when your process terminates.
Certain device control actions are taken by the device control software
at every call to FCLOSE, as shown in Table 8-3. This means that if you
have programmatically altered one of these device settings (through the
programmatic control listed in the table), the device will return to the
system default setting at FCLOSE.
You should note that Table 8-3 shows only those control actions taken
by the device control software. Additional changes may result from
actions taken by other software modules. For example, should your
program disable the system break feature, break will be reenabled on
FCLOSE by the Command Interpreter software.
Table 8-3 Device Control Action at FCLOSE
For most other device settings that can be programmatically altered,
you are responsible for making sure that the altered characteristics are
returned to their original settings when your program ends or for
assuring that the altered characteristics define the way you want the
device to act. For example, if you programmatically alter the speed
setting of a device, you should return the terminal to its original setting
when your program terminates unless you want the new speed setting
to be in effect for other files opened against the same device.
FCLOSE Action Related Programmatic Control
Disable Read Timeout Value set by FCONTROL(4)
Disable Subsystem Break Enabled through FCONTROL(17)
Enable Printing !!! on the deletion Printing !!! disabled through FCONTROL(35)
Disable Transparent Editing Enabled through FCONTROL(41)