Difference between revisions of "SET FILE"

From VSI OpenVMS Wiki
Jump to: navigation, search
m
(add Category:DCL Commands)
 
(2 intermediate revisions by 2 users not shown)
Line 82: Line 82:
 
| FAT$C_MODDATE  
 
| FAT$C_MODDATE  
 
| XAB$Q_MOD
 
| XAB$Q_MOD
| last time data was modified
+
| date of the last time data was modified
 
|-
 
|-
 
| MRS:value  
 
| MRS:value  
Line 127: Line 127:
 
| FAT$B_RATTRIB=0  
 
| FAT$B_RATTRIB=0  
 
| FAB$B_RAT=0
 
| FAB$B_RAT=0
| indicates that no record atributes are specified
+
| indicates that no record attributes are specified
 
|-
 
|-
 
| RAT:PRN  
 
| RAT:PRN  
Line 215: Line 215:
  
 
=See also=
 
=See also=
* [https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c04623195 OpenVMS DCL Dictionary]
+
* [https://vmssoftware.com/docs/VSI_DCL_DICT_VOL_II.pdf OpenVMS DCL Dictionary:N-Z]
* [http://vmssoftware.com/docs/VSI_OpenVMS_BaseOS/6346_System_Security_Guide.pdf OpenVMS Guide to System Security]
+
* [https://vmssoftware.com/docs/VSI_System_Security_Manual.pdf OpenVMS Guide to System Security]
* [ftp://ftp.hp.com/pub/openvms/doc/AA-PV6SF-TK.PDF OpenVMS I/O User's Reference Manual]
+
* [https://vmssoftware.com/docs/VSI_IO_REF.pdf I/O User's Reference Manual]
 +
 
 +
[[Category:DCL Commands]]

Latest revision as of 03:59, 25 November 2021

SET FILE is a DCL command that modifies file characteristics.

Syntax

SET FILE filespec

Qualifiers

  • /ATTRIBUTE=(file-attribute[,...]) sets the attributes associated with a file. The following table lists possible keywords and the relationship to both ACP-QIO and OpenVMS RMS File attributes:
Keyword ACP_QIO File Attribute OpenVMS RMS File Attribute Description
ATTDATE=date FAT$C_ATTDATE XAB$Q_ATT attribute modification date
ACCDATE=date FAT$C_ACCDATE XAB$Q_ACC file access date
BAKDATE=date FAT$C_BAKDATE XAB$Q_BDT backup date
BKS:value FAT$B_BKTSIZE=byte FAB$B_BKS=byte bucket size
CREDATE=date FAT$C_CREDATE XAB$Q_CDT creation date
DEQ:value FAT$W_DEFEXT=word FAB$W_DEQ=word default extend quantity
EBK:value FAT$L_EFBLK=longword XAB$L_EBK=longword end of file VBN
EXPDATE=date FAT$C_EXPDATE XAB$Q_EDT expiration date
FFB:value FAT$W_FFBYTE=word XAB$W_FFB=word first free byte in FAT$L_EFBLK
FSZ:value FAT$B_VFCSIZE=byte FAB$B_FSZ=byte size in bytes of fixed-length control for VFC records
GBC:value FAT$W_GBC=word FAB$W_GBC=word global buffer count
HBK:value FAT$L_HIBLK=longword XAB$L_HBK=longword highest allocated VBN
LRL:value FAT$W_RSIZE=word XAB$W_LRL=word record size
MODDATE=date FAT$C_MODDATE XAB$Q_MOD date of the last time data was modified
MRS:value FAT$W_MAXREC=word FAB$W_MRS=word maximum record size
ORG:IDX FAT$V_FILEORG=FAT$C_INDEXED FAB$B_ORG=FAB$C_IDX indicates that the file is indexed
ORG:REL FAT$V_FILEORG=FAT$C_RELATIVE FAB$B_ORG=FAB$C_REL indicates that the file is relative
ORG:SEQ FAT$V_FILEORG=FAT$C_SEQUENTIAL FAB$B_ORG=FAB$C_SEQ indicates that the file is sequential
RAT:BLK FAT$B_RATTRIB=FAT$M_NOSPAN FAB$B_RAT=FAB$M_BLK indicates that the file does not have spanned records
RAT:CR FAT$B_RATTRIB=FAT$M_IMPLIEDCC FAB$B_RAT=FAB$M_CR indicates that the file has implied carriage control
RAT:FTN FAT$B_RATTRIB=FAT$M_FORTRANCC FAB$B_RAT=FAB$M_FTN indicates that the file has Fortran carriage control
RAT:MSB FAT$B_RATTRIB=FAT$M_MSBVAR FAB$B_RAT=FAB$M_MSB
RAT:NONE FAT$B_RATTRIB=0 FAB$B_RAT=0 indicates that no record attributes are specified
RAT:PRN FAT$B_RATTRIB=FAT$M_PRINTCC FAB$B_RAT=FAB$M_PRN indicates that the file has print file carriage control
REVDATE=date FAT$C_REVDATE XAB$Q_RDT revision date and time
RFM:FIX FAT$V_RTYPE=FAT$C_FIXED FAB$B_RFM=FAB$C_FIX indicates that record type is fixed-length
RFM:STM FAT$V_RTYPE=FAT$C_STREAM FAB$B_RFM=FAB$C_STM indicates that the file is in RMS stream format
RFM:STMCR FAT$V_RTYPE=FAT$C_STREAMCR FAB$B_RFM=FAB$C_STMCR indicates that the file is in RMS stream terminated by CR format
RFM:STMLF FAT$V_RTYPE=FAT$C_STREAMLF FAB$B_RFM=FAB$C_STMLF indicates that the file is in RMS stream terminates by LF format
RFM:UDF FAT$V_RTYPE=FAT$C_UNDEFINED FAB$B_RFM=FAB$C_UDF indicates that the file is in undefined record format (stream binary)
RFM:VAR FAT$V_RTYPE=FAT$C_VARIABLE FAB$B_RFM=FAB$C_VAR indicates that the record type is variable-length
RFM:VFC FAT$V_RTYPE=FAT$C_VFC FAB$B_RFM=FAB$C_VFC indicates that the record type is variable-length fixed control
VRS:value FAT$W_VERSIONS=word XAB$W_VERLIMIT=word default version limit (valid only if the file is a directory)
  • /[NO]BACKUP specifies whether the BACKUP utility records the contents of the file. /NOBACKUP causes only the attributes of the file to be recorded, but not its contents; this is usually used for system files such as INDEXF.SYS or page and swap files. This qualifier is valid only for ODS-2 and ODS-5 files.
  • /BEFORE[=time] selects only the files dated prior to the specified date. See the full description of this qualifier in the dedicated article.
  • /BY_OWNER[=uic] selects only those files whole owner UIC matches the specified UIC. The default is the UIC of the current process.
  • /CACHING_ATTRIBUTE=keyword controls the default caching option used by the Extended File Cache when an application accesses the file without specifying which caching option it wants to use on this file or, if the file is a directory file, which caching option will be inherited by new files and subdirectories created in this directory. The keywords are:
    • WRITETHROUGH: the file should be cached
    • NO_CACHING: the file should not be cached
  • /[NO]CONFIRM controls whether a request is issued before each SET FILE operation to confirm whether the operation should be performed on each particular file. See CONFIRM Qualifier for a full description of this qualifier.
  • /CREATED: see /BEFORE or /SINCE.
  • /DATA_CHECK[=([NO]READ,[NO]WRITE)] specifies whether a read data check (rereading each record), a write data check (reading each record after it is written), or a combination of the two is performed on the file during transfers. By default, a write data check is performed.
  • /END_OF_FILE resets the end-of-file (EOF) mark to the highest block allocated.
  • /ENTER=new-filespec creates an alias or a hardlink for the file.
  • /ERASE_ON_DELETE specifies that the specified files are explicitly erased from the disk when removed with the DELETE or PURGE command.
  • /EXCLUDE=(filespec[,...]) excludes the specified file from the operation. See EXCLUDE Qualifier for a full description of this qualifier.
  • /[NO]EXPIRATION_DATE[=date] controls whether an expiration date is assigned to specific files. Expiration date is used to protect files from overwriting: to overwrite an unexpired file, you will have to specify /OVERRIDE=EXPIRATION when you mount the volume. Requires Read, Write, and Control access to the file. Date should be specified as absolute time; absolute time keywords are allowed. If you specify 0 as the date, today's date is used.
  • /EXTENSION[=n] sets the extend quantity default for the file, the number of blocks to extend a sequential file. The value of n can range from 0 to 65,535. If you omit the value specification or specify a value of 0, OpenVMS Record Management Services (OpenVMS RMS) calculates its own value for the /EXTENSION qualifier.
  • /[NO]GLOBAL_BUFFER[=keyword[=n]] sets the RMS global buffer count (the number of buffers that can be shared by processes accessing the file) for the specified files. The keywords are:
    • COUNT=n specifies the longword count of the number of global buffers
    • PERCENT=p specifies the size of the global cache as percent of the total number of blocks currently used in the file.
    • DEFAULT requests RMS at runtime to recalculate the global cache size based on an algorithm that makes use of two global buffer SYSGEN parameters, GB_CACHEALLMAX and GB_DEFPERCENT.
  • /MODIFIED modifies the time value specified with /BEFORE or /SINCE. See BEFORE Qualifier or SINCE Qualifier for more information.
  • /[NO]MOVE controls whether movefile operations are enabled on the specified volume. When you create a file, movefile operations are enabled on that file. You should disable movefile operations on specialized files that are accessed other than through the XQP (such as files accessed through logical I/O to a disk). Note that movefile operations are automatically disabled on critical system files. Do not enable movefile operations on these files.
  • /NODIRECTORY removes the directory attributes of a file, which allows you to delete the file even if other files are contained in the directory. Requires SYSPRV.
  • /REMOVE allows you to remove aliases and hardlinks.
  • /SHARE allows you to enable or disable global buffers or statistics on a file currently being accessed by other users. Requires SYSPRV.
  • /[NO]SHELVABLE controls whether the file is shelvable.
  • /SINCE selects only those files dated on or after the specified time. See SINCE Qualifier for a full description of this qualifier.
  • [NO]STATISTICS enables the gathering of RMS statistics on the specified file. These statistics can then be viewed by using the Monitor utility, which is invoked with the DCL command MONITOR. The SET FILE/STATISTICS command applies an application ACE to the specified file. The ACE does not affect access control and is only meaningful to the application assigning it.
  • /STYLE=keyword spcifies the file name format for display purposes. The valid keywords are:
    • CONDENSED (default) displays a file name representation of what is generated to fit into a 255-length characters string. The filename may contain a DID or FID abbreviation in the file specification.
    • EXPANDED displays the file name representation of what is stored on the disk. This filename does not contain any DID or FID abbreviations.
  • /[NO]SYMLINK indicates whether the symbolic link is set. If an input file is a symbolic link, the file referred to by the symbolic link is the file that is set.
  • /TRUNCATE truncates the file at the end of the block containing the end-of-file (EOF) marker, that is, the qualifier releases allocated but unused blocks of the file.
  • /UNLOCK clears a file marked as deaccess locked. Deaccess locking is required by and used by those few applications that maintain their own locking and consistency, typically without the use of the OpenVMS distributed lock manager, and potentially also without the use of RMS. When an application using deaccess locking does not correctly deaccess the file (often due to an application or system failure), the file is marked as locked, and is thus inaccessable until the integrity of the contents of the file are verified and the SET FILE/UNLOCK command is used. This command does not affect the state of files that are locked using RMS or the distributed lock manager.
  • /VERSION_LIMIT[=n] specifies the maximum number of versions for the specified file. No value specified or 0 means that the version number is only limited by the [[Files-11] architectural limit of 32,767.

See also