Accessing Files Programmer's Guide (32650-90885)

Chapter 13 163
Maintaining File Security
Access Control Definition Security (ACD)
var
status : integer;
filename : packed array [1..28] of char;
ACD : packed array [1..256] of char;
procedure HPACDPUT;intrinsic;
begin
filename := 'TARGET';
ACD := '(x:@.@;r,w:mgr.sys)'
ACD[20] := #m;
HPACDPUT(status, 1, filename, 20, ACD)
if status <> 0 then
writeln('HPACDPUT failed. Status = ', status);
end.
When you create a new file with the COPY, FCOPY, STORE, or RESTORE commands, you can
use the command parameters to create the ACDs for the new file.
COPY
The COPY command automatically copies any ACD attributes from the source file to the
target file, provided that the user is an owner of the source file or has RACD access to
that file.
COPY FILEA,FILEB
FCOPY
The ;COPYACD parameter of the FCOPY command permits the user to copy a file and its
ACD, provided that the user is an owner or has RACD permission.
FCOPY <;fcopycommand>;COPYACD
STORE
To store all of the files on a system to tape, including their ACDs, enter this:
FILE T;DEV=TAPE
STORE @.@.@;*T;COPYACD
COPYACD is the default. You must have access to any ACD-protected files being stored.
SM and OP can store any ACD-protected file on the system.
AM can store any ACD-protected file in the manager's account.
Users can store any ACD-protected files that they own, provided that they have
Read access to the file and RACD access to the file if ;COPYACD is specified.
Others can store ACD-protected files for which they have RACD permission,
provided that they have Read access to the file and RACD access to the file if
;COPYACD is specified.
You must have PM access to a PM file in order to store it.
RESTORE