Accessing Files Programmer's Guide (32650-90885)

Chapter 13 181
Maintaining File Security
Traditional Mechanism for File Security
time, but wish to correct some of the data in the file rather than delete it. You could use the
FILE command to override the programmatic specification, opening the file for update
access:
FILE REPFILE; ADD=UPDATE
RUN PROGN \
Requests update access
Consider a program that reads input from a terminal (file name INDEV) directs output to a
line printer (OUTDEV). You can redirect the output so that it is transmitted to the terminal
by entering:
FILE INDEV; DEV=TERM; ACC=INOUT <---- Respecifies INDEV for
both input and output access
FILE OUTDEV=*INDEV <---- Equates INDEV to OUTDEV
RUN PROGO <---- Runs program
Specifying and restricting file access by type or user
Restrictions on who can access a file are established when the file is created according to
the default prescribed for the group and account where the file resides. The capabilities of
the user who accesses a file may determine the security restrictions that apply to him. The
types of users recognized by the MPE/iX security system, the mnemonic codes used to
reference them, and their complete definitions are listed in Table 13-12. on page 181
Table 13-11. Effects of Access Modes
ACCESS MODE CURRENT EOF LOGICAL RECORD
POINTER
EOF AFTER OPEN
Read-only 10 0 10
Write-only 10 0 0
Write-SAVE 10 0 10
Append 10 10 10
Read/Write 10 0 10
Update 10 0 10
Table 13-12. User Type Definitions (Traditional Security)
USER TYPE MNEMONIC
CODE
MEANING
Any User ANY Any user defined in the system; this includes all categories
defined below.
Account
Librarian User
AL User with Account Librarian capability, who can manage
certain files within his account that may or may not all belong
to one group.