Document revision date: 19 July 1999
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

OpenVMS DCL Dictionary


Previous Contents Index

The SUBMIT command in this example queues the command procedure CLIMATE.COM for processing as a batch job. The SET ENTRY command places the job in a hold state and changes the job name to TEMP, assuming that the job has not yet begun execution.
#3

$ PRINT/FLAG=ALL/AFTER=20:00 MEMO.MEM, LETTER.MEM, REPORT.MEM/SPACE
  Job MEMO (queue SYS$PRINT, entry 172) holding until 20:00
$ SET ENTRY 172 /BURST/NOSPACE/HEADER
 
      

The PRINT command in this example requests that three files be printed after 8:00 P.M. on the default printer with flag pages preceding each file. It also requests that the file REPORT.MEM be double-spaced. Later a SET ENTRY command calls for a burst page at the beginning of each file and requests that all files in the job be single-spaced. This command also requests that headers be printed on each page of each file in the job.


SET FILE

Modifies the characteristics of one or more files.

See the qualifier descriptions for restrictions.


Format

SET FILE filespec[,...]


Parameter

filespec[,...]

Specifies one or more files to be modified. If you specify more than one file, separate the file specifications with commas (,). The asterisk (*) and the percent sign (%) wildcard characters are allowed.

Description

The SET FILE command modifies a number of file characteristics.

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 Attribute1 OpenVMS RMS File Attribute2
BKS:{value} FAT$B_BKTSIZE={byte} FAB$B_BKS={byte}
DEQ:{value} FAT$W_DEFEXT={word} FAB$W_DEQ={word}
EBK:{value} FAT$L_EFBLK={longword} XAB$L_EBK={longword}
FFB:{value} FAT$W_FFBYTE={word} XAB$W_FFB={word}
FSZ:{value} FAT$B_VFCSIZE={byte} FAB$B_FSZ={byte}
GBC:{value} FAT$W_GBC={word} FAB$W_GBC={word}
HBK:{value} FAT$L_HIBLK={longword} XAB$L_HBK={longword}
LRL:{value} FAT$W_RSIZE={word} XAB$W_LRL={word}
MRS:{value} FAT$W_MAXREC={word} FAB$W_MRS={word}
ORG:IDX FAT$V_FILEORG=FAT$C_INDEXED FAB$B_ORG=FAB$C_IDX
ORG:REL FAT$V_FILEORG=FAT$C_RELATIVE FAB$B_ORG=FAB$C_REL
ORG:SEQ FAT$V_FILEORG=FAT$C_SEQUENTIAL FAB$B_ORG=FAB$C_SEQ
RAT:BLK FAT$B_RATTRIB=FAT$M_NOSPAN FAB$B_RAT=FAB$M_BLK
RAT:CR FAT$B_RATTRIB=FAT$M_IMPLIEDCC FAB$B_RAT=FAB$M_CR
RAT:FTN FAT$B_RATTRIB=FAT$M_FORTRANCC FAB$B_RAT=FAB$M_FTN
RAT:MSB FAT$B_RATTRIB=FAT$M_MSBVAR FAB$B_RAT=FAB$M_MSB
RAT:NONE FAT$B_RATTRIB=0 FAB$B_RAT=0
RAT:PRN FAT$B_RATTRIB=FAT$M_PRINTCC FAB$B_RAT=FAB$M_PRN
RFM:FIX FAT$V_RTYPE=FAT$C_FIXED FAB$B_RFM=FAB$C_FIX
RFM:STM FAT$V_RTYPE=FAT$C_STREAM FAB$B_RFM=FAB$C_STM
RFM:STMCR FAT$V_RTYPE=FAT$C_STREAMCR FAB$B_RFM=FAB$C_STMCR
RFM:STMLF FAT$V_RTYPE=FAT$C_STREAMLF FAB$B_RFM=FAB$C_STMLF
RFM:UDF FAT$V_RTYPE=FAT$C_UNDEFINED FAB$B_RFM=FAB$C_UDF
RFM:VAR FAT$V_RTYPE=FAT$C_VARIABLE FAB$B_RFM=FAB$C_VAR
RFM:VFC FAT$V_RTYPE=FAT$C_VFC FAB$B_RFM=FAB$C_VFC
VRS:{value} FAT$W_VERSIONS={word} XAB$W_VERLIMIT={word}

1For further information, refer to the OpenVMS I/O User's Reference Manual.
2For further information, refer to the OpenVMS Record Management Services Reference Manual.

/BACKUP

/NOBACKUP

Specifies that the Backup utility (BACKUP) records the contents of the file. The /NOBACKUP qualifier causes BACKUP to record the attributes of the file but not its contents. This qualifier is valid only for Files-11 Structure On-Disk Level 2 files.

The /NOBACKUP qualifier is useful for saving files that contain unimportant data, such as SWAPFILES.

/BEFORE[=time]

Selects only those files dated prior to the specified time. You can specify time as absolute time, as a combination of absolute and delta times, or as one of the following keywords: BOOT, LOGIN, TODAY (default), TOMORROW, or YESTERDAY. Specify the /CREATED or the /MODIFIED qualifier to indicate the time attribute to be used as the basis for selection. The /CREATED qualifier is the default.

For complete information on specifying time values, refer to the OpenVMS User's Manual or the online help topic DCL_Tips (subtopic Date_Time).

/BY_OWNER[=uic]

Selects only those files whose owner user identification code (UIC) matches the specified owner UIC. The default UIC is that of the current process.

Specify the UIC by using standard UIC format as described in the OpenVMS Guide to System Security.

/CACHING=option (Alpha only)

On Alpha systems, this qualifier sets the caching attribute of files and directories stored in Spiralog volumes, whose device type is Files_64. It returns an error if any of the specified files and directories are not in Spiralog volumes.

The caching attribute of a file specifies the default caching option for the file. This is the caching option that is used whenever an application accesses the file without specifying which caching option it wants to use.

The value of option can be one of the following:

The caching attribute of a directory controls how the caching attribute is inherited by new files created in it.

When you create a new directory or file, it inherits its caching attribute from its parent directory. When you create a new version of an existing file, the new file inherits its caching attribute from the highest version of the existing file.

When you change the caching attribute of a directory, it does not affect the caching attribute of any existing files and subdirectories in the directory.

When you change the caching attribute of a file, it does not affect the caching option being used by applications that are currently accessing the file. It affects only subsequent accesses to the file.

/CONFIRM

/NOCONFIRM (default)

Controls whether a request is issued before each SET FILE operation to confirm that the operation should be performed on that file. The following responses are valid:
YES NO QUIT
TRUE FALSE Ctrl/Z
1 0 ALL
  [Return]  

You can use any combination of uppercase and lowercase letters for word responses. Word responses can be abbreviated to one or more letters (for example, T, TR, or TRU for TRUE), but these abbreviations must be unique. Affirmative answers are YES, TRUE, and 1. Negative answers include: NO, FALSE, 0, and pressing the Return key. Entering QUIT or pressing Ctrl/Z indicates that you want to stop processing the command at that point. When you respond by entering ALL, the command continues to process, but no further prompts are given. If you type a response other than one of those in the list, DCL issues an error message and redisplays the prompt.

/CREATED (default)

Modifies the time value specified with the /BEFORE or the /SINCE qualifier. The /CREATED qualifier selects files based on their dates of creation. This qualifier is incompatible with the /MODIFIED qualifier, which also allows you to select files according to time attributes. The /CREATED qualifier is the default qualifier.

/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=alias-filespec

Use with caution.

Creates an alias for the specified file. Both the original name and the new alias refer to the same file. To remove the alias, use the SET FILE /REMOVE command.

Note

Make sure that the alias and the original name are in different directories, or you may subsequently lose data during a delete or purge operation. The DELETE and PURGE commands and the file version limit feature can behave unpredictably if the original name and the alias are in the same directory.

If you use aliases you must also be careful when you use the DELETE and SET FILE /REMOVE commands, or you may end up with either an inaccessable file that has no name or a name that does not refer to a file. Follow these guidelines to avoid these problems:

  • Use SET FILE /REMOVE to remove an alias; do not use the DELETE command to remove an alias.
  • Do not use SET FILE /REMOVE to remove the original file name.

If you do not follow these guidelines and encounter problems, use ANALYZE /DISK /REPAIR to move inaccessable files to the SYSLOST directory and remove names that no longer refer to files.

/ERASE_ON_DELETE

Specifies that the specified files are erased from the disk (not just written over) when the DELETE or PURGE command is issued for the files. See the DELETE/ERASE command for more information.

/EXCLUDE=(filespec[,...])

Excludes the specified file from the SET FILE operation. You can include a directory name but not a device name in the file specifications. The asterisk (*) and the percent sign (%) wildcard characters are allowed in the file specification. However, you cannot use relative version numbers to exclude a specific version. If you specify only one file, you can omit the parentheses.

/EXPIRATION_DATE=date

/NOEXPIRATION_DATE

Requires read (R), write (W), and control access. Being the owner of the file is one way to get control access.

Controls whether an expiration date is assigned to the specified files.

Specify the date according to the rules described in the OpenVMS User's Manual or the online help topic DCL_Tips (subtopic Date_Time). Absolute date keywords are allowed. If you specify zero as the date, today's date is used.

/EXTENSION[=n]

Sets the extend quantity default for the file. The value of the parameter 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.

See the SET RMS_DEFAULT command for a description of the /EXTEND_QUANTITY qualifier.

/GLOBAL_BUFFER=n

Sets the OpenVMS Record Management Services (OpenVMS RMS) global buffer count (the number of buffers that can be shared by processes accessing the file) for the specified files. The value n must be an integer in the range from 0 to 32,767. A value of 0 disables buffer sharing.

/LOG

/NOLOG (default)

Displays the file specification of each file modified as the command executes.

/MODIFIED

Modifies the time value specified with the /BEFORE or the /SINCE qualifier. The /MODIFIED qualifier selects files according to the dates on which they were last modified. This qualifier is incompatible with the /CREATED qualifier, which also allows you to select files according to time attributes. If you do not specify the /MODIFIED qualifier, the default is the /CREATED qualifier.

/MOVE

/NOMOVE

Controls whether movefile operations are enabled on the specified file.

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

Use with extreme caution. Requires SYSPRV (system privilege).

Removes the directory attributes of a file and allows you to delete the corrupted directory file even if other files are contained in the directory. When you delete a corrupted directory file, the files contained within it are lost.

Use ANALYZE/DISK_STRUCTURE/REPAIR to place the lost files in [SYSLOST]. You can then copy the lost files to a new directory. This qualifier is valid only for Files-11 On-Disk Structure Level 2 files. For more information about the Verify utility, refer to the OpenVMS System Management Utilities Reference Manual.

/OWNER_UIC[=uic]

This qualifier has been superseded by the SET SECURITY/OWNER command.

/PROTECTION[=(ownership[:access][,...])]

This command has been superseded by the SET SECURITY/PROTECTION command.

/REMOVE

Use with caution.

Enables you to remove one of the names of a file that has more than one name, without deleting the file. If you have created an additional name for a file with the /ENTER qualifier of SET FILE, you can use the /REMOVE qualifier to remove either the original name or the alias. The file still exists and can be accessed by whatever name or names remain in effect.

However, if you accidentally remove the name of a file that has only one name, you cannot access that file with most DCL commands; use the ANALYZE/DISK_STRUCTURE utility to retrieve the file.

/SEMANTICS=semantics-tag

/NOSEMANTICS

Use the /SEMANTICS qualifier to create or change a semantics tag. Use the /NOSEMANTICS qualifier to remove a semantics tag from a file. For more information, refer to the Guide to OpenVMS File Applications.

/SHELVABLE

/NOSHELVABLE

Controls whether the file is shelvable.

/SINCE[=time]

Selects only those files dated after the specified time. You can specify time as absolute time, as a combination of absolute and delta times, or as one of the following keywords: BOOT, LOGIN, TODAY (default), TOMORROW, or YESTERDAY. Specify the /CREATED or the /MODIFIED qualifier to indicate the time attribute to be used as the basis for selection. The /CREATED qualifier is the default.

For complete information on specifying time values, refer to the OpenVMS User's Manual or the online help topic DCL_Tips (subtopic Date_Time).

/STATISTICS

/NOSTATISTICS (default)

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

Specifies the file name format for display purposes.

The valid keywords for this qualifier are CONDENSED and EXPANDED. Descriptions are as follows:
Keyword Explanation
CONDENSED (default) Displays the file name representation of what is generated to fit into a 255-length character string. This file name may contain a DID or FID abbreviation in the file specification.
EXPANDED Displays the file name representation of what is stored on disk. This file name does not contain any DID or FID abbreviations.

The keywords CONDENSED and EXPANDED are mutually exclusive. This qualifier specifies which file name format is displayed in the output message, along with the confirmation if requested.

File errors are displayed with the CONDENSED file specification unless the EXPANDED keyword is specified.

Refer to the OpenVMS Guide to Extended File Specifications for more information.

/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

Makes one or more improperly closed files accessible.

/VERSION_LIMIT[=n]

Specifies the maximum number of versions for the specified file. If you do not specify a version limit, a value of 0 is used, indicating that the number of versions of a file is limited only to the Files-11 architectural limit of 32,767. When you exceed that limit, the earliest version of the file is deleted from the directory without notification to the user. For example, if you set the version limit to three when there are already five versions of that file in your directory, there will continue to be five versions of the file unless you specifically delete some or purge the directory. Once the number of versions is equal to or less than the current version limit, the version limit is maintained.

Examples

#1

$ SET FILE/EXPIRATION_DATE=19-DEC-1998:11:00 BATCH.COM;3
      

The SET FILE command requests that the expiration date of the file BATCH.COM;3 be set to 11:00 A.M., December 19, 1998.

#2

$ SET FILE/BEFORE=31-DEC/ERASE_ON_DELETE PERSONNEL*.SAL
      

This SET FILE command calls for all files that match the file specification PERSONNEL*.SAL and are dated before December 31 of the current year to have their disk locations erased whenever one of them is deleted with commands such as DELETE or PURGE.

#3

$ SET FILE/OWNER_UIC=[360,020]/VERSION_LIMIT=100 MYFILE.DAT
      

The SET FILE command modifies the characteristics of the file MYFILE.DAT, changing the owner user identification code (*). You must have system privilege (SYSPRV) to change the owner UIC.

#4

$ SET FILE/NOMOVE TEST.FDL
$DIRECTORY/FULL TEST.FDL
Directory SYS$SYSDEVICE:[MACKRILL]
TEST.FDL;1   File ID:  (10,8,0) 
   .
   .
   .
File attributes: Allocation: s, Extend: 0, Global buffer count: 0
   No version limit, MoveFile disabled
   .
   .
   .
      

Movefile operations are disabled on the file TEST.FDL. A DIRECTORY/FULL command on the file TEST.FDL affirms that the file attribute Movefile is disabled.

#5

$  SET FILE/ATTRIBUTES=ORG:SEQ -
_$ TEST$:[DATA]SET_ATTRIBUTES.DATA_FILE/LOG
%SET-I-MODIFIED, TEST$:[DATA]SET_ATTRIBUTES.DATA_FILE;1 MODIFIED
      

The command, SET FILE/ATTRIBUTES, changes the file organization of the specified file.

#6

$  SET FILE/PROTECTION=(S:RWE,O=RWE,G:RE,W:RE) TEMP.DIR
$ DIRECTORY/PROTECTION TEMP.DIR
Directory DKB0:[MACKRILL]
TEMP.DIR;1           (RWE,RWE,RE,RE)
      

This example sets the protection on the TEMP.DIR file with the SET FILE command and then displays the protection of the file with the DIRECTORY command.


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
9996PRO_051.HTML