Accessing Files Programmer's Guide (32650-90885)

Chapter 7 115
Record Selection and Data Transfer
Magnetic Tape Considerations
record number relative to the start of the file (record 0).
You can use The FPOINT intrinsic only with files that contain fixed-length or
undefined-length records; variable-length record files are not allowed. The FPOINT
intrinsic may not be used when you have opened your file with Append access; the file
system returns a CCL condition if you attempt to use it in this case. It is legal to point to
any record between the start of file and the file limit. Subsequent reads will fail if the data
pointer is positioned beyond the EOF. If the data pointer is positioned beyond the EOF and
a subsequent write is done, this will become the new EOF and all data between the old and
new EOF will be initialized with the fill character.
Rewinding
When you "rewind" your file, you set the record pointer to indicate record 0, the first record
in your file. Use the FCONTROL intrinsic with a control code of 5 to accomplish this.
FCONTROL's syntax in this case would be
FCONTROL(filenum,5,dummyparam);
Issuing this intrinsic call sets the record pointer to record 0. You can use FCONTROL with
fixed-length, variable-length, or undefined-length record files; you can use it with any
access method.
NOTE
FCONTROL's control code 5 has a special meaning when used with Append
access. The file system sets the record pointer to record 0, as with other access
modes, but at the time of the next write operation to the file, the record
pointer is set to the end of the file so that no data is overwritten.
For more information about the FSPACE, FPOINT, and FCONTROL intrinsics, consult the
MPE/iX Intrinsics Reference Manual.
Magnetic Tape Considerations
The most common medium for storage of a device file is magnetic tape. This section
describes the matters that you should keep in mind when you work with your magnetic
tape files.
Every standard reel of magnetic tape designed for digital computer use has two reflective
markers located on the back side of the tape (opposite the recording surface). As illustrated
in Figure 7-2., one of these marks is located behind the tape leader at the
beginning-of-tape (BOT) position, and the other is located in front of the tape trailer at the
end-of-tape (EOT) position. These markers are sensed by the tape drive itself and their
position on the tape (left or right side) determines whether they indicate the BOT or EOT
positions: