HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS DCL Dictionary

Previous Contents Index


Returns attribute information for a specified file.


F$FILE_ATTRIBUTES (filespec,item)

Return Value

Either an integer or a character string, depending on the item you request. Table DCLI-5 shows the data types of the values returned for each item.



Specifies the name of the file about which you are requesting information. You must specify the file name as a character string expression.

You can specify only one file name. Wildcard characters are not allowed.


Indicates which attribute of the file is to be returned. The item argument must be specified as a character string expression, and can be any one of the OpenVMS RMS field names listed in Table DCLI-5.


Use the F$FILE_ATTRIBUTES lexical function in DCL assignment statements and expressions to return file attribute information. Table DCLI-5 lists the items you can specify with the F$FILE_ATTRIBUTES function, the information returned, and the data type of this information.

Item Return Type Information Returned
AI String TRUE if after-image (AI) journaling is enabled; FALSE if disabled.
ALQ Integer Allocation quantity.
BDT String Backup date/time.
BI String TRUE if before-image (BI) journaling is enabled; FALSE if disabled.
BKS Integer Bucket size.
BLS Integer Block size.
CBT String TRUE if contiguous-best-try; otherwise FALSE.
CDT String Creation date/time.
CTG String TRUE if contiguous; otherwise FALSE.
DEQ Integer Default extension quantity.
DID String Directory ID string.
DIRECTORY String Returns TRUE or FALSE. Returns TRUE if it is a directory.
DVI String Device name string.
EDT String Expiration date/time.
EOF Integer Number of blocks used.
ERASE String TRUE if a file's contents are erased before a file is deleted; otherwise FALSE.
FFB Integer First free byte.
FID String File ID string.
FILE_LENGTH_HINT String Record count and data byte count in the form ( n,m), where n is the record count and m is the data byte count. An invalidated count is specified by a -1 for n or m.
FSZ Integer Fixed control area size.
GBC Integer Global buffer count.
GRP Integer Owner group number.
JOURNAL_FILE String TRUE if the file is a journal; otherwise FALSE.
KNOWN String Known file; returns TRUE or FALSE to indicate whether file is installed with the Install utility (INSTALL). However, returns NOSUCHFILE if a file does not exist (for example, the file has been installed but subsequently deleted).
LOCKED String TRUE if a file is deaccessed-locked; otherwise FALSE.
LRL Integer Longest record length.
MBM Integer Owner member number.
MOVE String TRUE if movefile operations are enabled; otherwise FALSE.
MRN Integer Maximum record number.
MRS Integer Maximum record size.
NOA Integer Number of areas.
NOBACKUP String FALSE if the file is marked for backup; TRUE if the file is marked NOBACKUP.
NOK Integer Number of keys.
ORG String File organization; returns SEQ, REL, IDX.
PRESHELVED (Alpha/I64 only) String TRUE if the file is preshelved; otherwise FALSE.
PRO String File protection string.
PVN Integer Prolog version number.
RAT String Record attributes; returns CR, PRN, FTN, "".
RCK String TRUE if read check; otherwise FALSE.
RDT String Revision date/time.
RFM String Record format string; returns the values VAR, FIX, VFC, UDF, STM, STMLF, STMCR.
RU String TRUE if recovery unit (RU) journaling is enabled; returns TRUE or FALSE.
RVN Integer Revision number.
SHELVABLE String TRUE if the file is shelvable; otherwise FALSE.
SHELVED String TRUE if the file is shelved; otherwise FALSE.
STORED_SEMANTICS String ASCII string that represents stored semantics.
UIC String Owner user identification code (UIC) string.
VERLIMIT Integer Version limit number. The value 32767 indicates that no version limit was set.
WCK String TRUE if write check; otherwise FALSE.

File attributes are stored in the file header, which is created from information in OpenVMS RMS control blocks. For more information on OpenVMS RMS control blocks, refer to the OpenVMS Record Management Services Reference Manual.




This example uses the F$FILE_ATTRIBUTES function to assign the value of the file organization type to the symbol FILE_ORG. The F$FILE_ATTRIBUTES function returns the character string SEQ to show that QUEST.DAT is a sequential file.

The QUEST.DAT and ORG arguments for the F$FILE_ATTRIBUTES function are string literals and must be enclosed in quotation marks (" ") when used in expressions.


  RFM = "VAR"

This example uses the F$FILE_ATTRIBUTES function to return information about a file on a remote node. The function returns the record format string VAR, indicating that records are variable length.

Previous Next Contents Index