User`s guide
Disk I/O
The following sections discuss disk I/O.
Attaching Disk Devices
A disk LUN refers to a local disk device, such as a 3-1/2 inch diskette drive, the hard disk on a
SIO based system, or the Compact Flash in an AWC (AdeptWindows Controller) system. Also,
a remote disk may be accessed via the Kermit protocol or a network.
The type of device to be accessed is determined by the DEFAULT command or the ATTACH
instruction. If the default device type set by the DEFAULT command is not appropriate at a
particular time, the ATTACH instruction can be used to override the default. The syntax of the
ATTACH instruction is:
ATTACH (lun, mode) $device
See the documentation for the ATTACH program instruction for the mode options and
possible device names. The instruction:
ATTACH (dlun, 4) "DISK"
attaches to an available disk logical unit and returns the number of the logical unit in the
variable dlun, which can then be used in other disk I/O instructions.
If the device name is omitted from the instruction, the default device for the specified LUN is
used. Adept recommends that you always specify a device name with the ATTACH
instruction. (The device SYSTEM refers to the device specified with the DEFAULT monitor
command.)
Once the attachment is made, the device cannot be changed until the logical unit is
detached. However, any of the units available on the device can be specified when opening a
file. For example, the V+ DISK units are A, C and D. After attaching a DISK device LUN, a
program can open and close files on either of these disk units before detaching the LUN.
Disk I/O and the Network File System (NFS)
In addition to local disk devices, an Adept system equipped with the optional Ethernet
hardware and the TCP/IP and NFS licenses can mount remote disk drives. Once mounted,
these access remote disk drives can be accessed in the same fashion as local disks.
The following sections describe accessing a disk drive regardless of whether it is a local drive or
a remotely-accessed drive. See the AdeptNet User's Guide for details on creating an NFS
mount.
Disk Directories
The FOPEN_ instructions, which open disk files for reading and writing, use directory paths in
the same fashion as the monitor commands LOAD, STORE, etc. Files on a disk are grouped in
Disk I/O
V+Language User's Guide, v17.0
Page 214










