Guardian Programming Reference Summary for pTAL and TAL

Guardian Programming Reference Summary for pTAL and TAL—522631-001
11-1
11
SETMODE Operations
For additional information about the SETMODE procedure call, refer to the Guardian
Procedure Calls Reference Manual.
function Parameters and Effect
1 Disk: Set file security
param1
<0> = 1 for program files only, sets accessor's ID to program file's ID
when program file is run (PROGID option).
<1> = 1 sets CLEARONPURGE option to on. This means that all data
in the file is physically erased from the disk (set to zeros) when the file is
purged. If this option is not on, the disk space is only logically deallocated on
a purge; the data is not destroyed, and another user might be able to examine
the "purged" data when the space is reallocated to another file.
<4:6> = ID allowed for reading
<7:9> = ID allowed for writing
<10:12> = ID allowed for execution
<13:15> = ID allowed for purging
For each of the fields from <4:6> through <13:15>, the value can be any one
of the following:
0 = member local ID
1 = member of owner's group (local)
2 = owner (local)
4 = any network user (local or remote)
5 = member of owner's community
6 = local or remote user having same ID as owner
7 = local super ID (255,255) only
Refer to the Guardian Programmer’s Guide or the File Utility Program (FUP)
Reference Manual for an explanation of local and remote users, communities,
and related topics.
The param2 parameter is not used with function 1.
If this SETMODE function is used on a file that is protected by a Safeguard
disk-file authorization record, and if the user is not logged on as the super ID
on the system where the file is located, error 199 is returned.
This function operates only on Guardian objects. If an OSS file is specified,
file-system error 2 occurs.
2 Disk: Set file owner ID
param1
.<0:7> = group ID
.<8:15> = member ID
The param2 parameter is not used with function 2.
If this SETMODE function is used on a file that is protected by a Safeguard
disk-file authorization record, and if the user is not logged on as the super ID
on the system where the file is located, error 199 is returned.