Accessing Files Programmer's Guide (32650-90885)

Chapter 13 179
Maintaining File Security
Traditional Mechanism for File Security
Traditional Mechanism for File Security
The traditional security mechanism (file access matrix and lockwords) associates with
each account, group, and individual files a set of security provisions that specifies any
restrictions on access to the files in that account or group, or to that particular file.
NOTE
These provisions apply to disk files only. If a file is protected by the
traditional security mechanism and by an ACD definition, the ACD definition
overrides the traditional security mechanism. ACD security mechanism are
discussed at the beginning of this chapter under <Undefined
Cross-Reference>.
These restrictions are based on two factors:
modes of access--reading, writing, or saving, for example.
types of user--users with account librarian (AL) or group librarian (GL) capability, or
creating users, for example, to whom the access modes specified are permitted
The security provisions for any file describe what modes of access are permitted to which
users of that file.
Specifying and restricting file access by access mode
When a program opens or creates a file, it can define the way that the file can be accessed
by specifying a particular access mode (such as Read-only, Write-only, Update, and so
forth) for the file. These specifications apply to files on any device and can be changed or
overridden only by yourself, as the creator of the file. They are discussed in the following
paragraphs. In addition, for files on disk, a program can also restrict access so that only
one access attempt (HPFOPEN/FOPEN call) or process (running program) can open it at one
time, or can allow it to be shared among several accessors.
The access types that can be specified by a program are listed in Table 13-10. on page 180
When specifying the access mode for a file, it is important to realize where the current
end-of-file is before and after the file is opened, and where the logical record pointer
indicates that the next operation will begin. These factors depend upon the access mode
that you select. Because they are best explained by example, the effects of each access
mode upon these factors are summarized in Table 13-1. on page 167 for a sample file. This
8 Account name
8 job or session name
Table 13-9. Type 138 Record Format
length, in 16-bit
words
Record Content