Sharing Files and Locking Records
8.2 Choosing X/Open Standard or Compaq Standard File Sharing and Record Locking
• The /STANDARD=[NO]XOPEN qualifier on the COBOL command for the
OpenVMS Alpha operating system
If you do not specify the flag or qualifier, the default is
noxopen
(Compaq
standard) file sharing and record locking.
If you want X/Open file sharing and record locking and have not used the LOCK
MODE clause, therefore, you should specify /STANDARD=XOPEN or
-std xopen
to ensure X/Open standard behavior in instances of conflicting default semantics.
Note, however, that the qualifier/flag comes into effect only when the explicit
syntax has not determined the usage.
8.3 Ensuring Successful File Sharing
Successful file sharing requires that you:
• Provide disk residency for the file.
• Use the operating system file protection facility, namely the contents of
/etc/groups
(on Tru64 UNIX systems) or the UIC (on OpenVMS Alpha
systems).
• Determine the intended access mode to the file (Compaq COBOL open modes).
• Indicate the file access allowed by other streams, using X/Open standard or
Compaq standard syntax to specify file sharing.
The remainder of this section describes these requirements in more detail.
8.3.1 Providing Disk Residency
Only files that reside on a disk can be shared. In Compaq COBOL you can share
sequential, relative, and indexed files.
8.3.2 Using File Protection
By applying the appropriate file permissions at the operating system level, the
owner of a file determines how other users can access the file. An owner can
permit different types of file access for different users or groups.
Note
The following OpenVMS Alpha operating system file protection access
types are not a part of Compaq COBOL syntax.
The four types of file access are as follows:
• READ—Permits the reading of the records in the file.
• WRITE—Permits updating or extending the records in the file.
• EXECUTE—Applies to on-disk volume protection and image execution and is
therefore not applicable to a Compaq COBOL program except through system
service routines.
• DELETE—Permits deletion of the file and is therefore not applicable to a
Compaq COBOL program (since Compaq COBOL has no delete file facility)
except through system service routines.
8–4 Sharing Files and Locking Records