Technical data
Using Files and Directories
10.5 Protecting Files
In this example, the file INCOME.DAT;3 is protected against deletion. The
SET SECURITY/PROTECTION command changes only the owner’s delete
access for the file INCOME.DAT;3. Now the owner can delete the file.
2.
$ SET SECURITY/PROTECTION=(SYSTEM:R,OWNER:RWED,GROUP:RW) PAYROLL.LIS
In this example, the SET SECURITY/PROTECTION command changes the
protection codes applied to the PAYROLL.LIS file. To the file, the command
gives the system read access; the owner has read, write, execute, and delete
access; and users in the owner’s group have read and write access.
10.5.3.3.2 Using the SET FILE Command You can use the DCL command SET
FILE to modify the characteristics of one or more files or to assign an additional
name, or alias, to a file. The following examples illustrate ways you can use the
SET FILE command.
Examples
1.
$ SET FILE/EXPIRATION_DATE=15-APR-2000:11:00 BATCH.COM;3
This SET FILE command requests that the expiration date of the file
BATCH.COM;3 be set to 11:00 a.m., April 15, 2000.
2.
$ SET FILE/BEFORE=15-APR-00/ERASE_ON_DELETE PERSONNEL*.SAL
This SET FILE command erases disk locations for files that are deleted with
commands such as DELETE or PURGE when applied to all files that match
the file specification PERSONNEL*.SAL and are dated before April 15, 2000.
3.
$ SET FILE/OWNER_UIC=[DOCUMENTATION,GRAY]/VERSION_LIMIT=100 MYFILE.DAT
This SET FILE command modifies the characteristics of the file
MYFILE.DAT, changing the owner UIC and assigning a file version limit
of 100. Note that the /OWNER_UIC qualifier requires SYSPRV or GRPPRV
privilege for changing the ownership at the system or group level.
4.
$ SET FILE OLD_FILENAME.DAT/ENTER=NEW_FILENAME.DAT
This SET FILE command assigns an additional name, or alias (NEW_
FILENAME.DAT), to the file OLD_FILENAME.DAT. Both the original name
and the alias refer to the same file. For this reason, be careful when you
delete files with aliases. To keep the file, but to remove one of its names,
use the /REMOVE qualifier with the SET FILE command. You cannot use
wildcards in the file name. (Refer to the OpenVMS DCL Dictionary for
details.)
Using Files and Directories 10–19










