Accessing Files Programmer's Guide (32650-90885)

Chapter 13 165
Maintaining File Security
Access Control Definition Security (ACD)
FOR XX.DESIGN: NONE
(Other ACD status reports are NO ACD and ACD CORRUPTED.)
The LISTFILE command with option -2 gives a detailed ACD report on a file in this
fashion:
LISTFILE FILEA,-2
FILE = FILEA ************** ACD ENTRIES **************
SAM.DOE : R
JOE.DOE : W
@.DESIGN : NONE
@.@ : X
The SHOWDEV command displays the ACD attributes of a device in this fashion:
SHOWDEV 14;ACD
LDEV AVAIL OWNERSHIP VOLID DEN ASSOCIATION
14 SPOOLED SPOOLER OUT
ACD ENTRIES: @.@ : R,W,X
This short program uses HPACDINFO to retrieve the number of entries and first user in the
ACD of a file called TARGET:
program acdinfo(input, output);
type
shortint = -32768..32767;
var
status : integer;
filename : packed array [1..28] of char;
numentry : shortint;
firstuser : packed array [1..18] of char;
procedure HPACDINFO;intrinsic;
begin
filename := 'TARGET';
HPACDINFO(status, 1, filename, 21, numentry, firstuser);
if status = 0 then
begin
writeln('Number of Entires: ', numentry:1);
writeln('First UserSpec : ', firstuser);
end;
end.