VOC F-Type Records  -  File Definitions

Top  Previous  Next

 

Every file referenced by an application is accessed via an F-type VOC record. This record maps the QM name of the file to the pathnames of the data and dictionary components.

 

1:F  { descriptive text }
2:The pathname(s) of the data portion of the file. In a multi-file, the pathname of each subfile appears as a separate value in this field
3:Dictionary pathname. This field is empty if the file has no dictionary.
4:Subfile names for a multifile. This field is empty for a simple file.
5:File inclusion flags for ACCOUNT.SAVE and FILE.SAVE.

There are three possible values:

DInclude only the dictionary of this file in the save
EExclude this file from the save
IInclude this file in the save

Leaving the field empty causes ACCOUNT.SAVE and FILE.SAVE to fall back on alternative file selection methods.

6:Special file open modes for QMBasic OPEN and OPENSEQ operations.  Value 1 of this field applies to the data part of the file. For a multifile, these modes apply to all elements. Value 2 applies to the dictionary part. Both may be any compatible combination of the codes listed below.
RSpecifies that the file is to be read-only when opened using this VOC item.
SSets synchronous (forced write) mode on the file (dynamic hashed files only).
TSuppress translation of restricted characters in directory file record ids. This affects only the data portion of the file. See also the NO.MAP option to the QMBasic OPENstatement. This flag can be set using the NO.MAP option to the CREATE.FILE or CONFIGURE.FILE commands.

Applications that make direct access to this field should allow for the presence of codes not in the above list.

 

Either pathname field may be blank to indicate that the file portion does not exist.

Three special pathname prefixes are allowed:

@QMSYS will be replaced by the QMSYS account directory pathname, ensuring that references to items in the QMSYS account will still function if a new release is installed at a different location.

@TMP will be replaced by the pathname in the TEMPDIR configuration parameter.

@HOME will be replaced by the value of the HOME environment variable on Linux or the HOMEPATH environment variable on Windows.

 

By using F-type VOC items to locate files indirectly rather than embedding file pathnames in the application, the VOC entry becomes the only place where the pathname is recorded. If a file is moved, perhaps to balance loading across multiple disks, only the VOC entry needs to be amended; the application itself is not affected.

 

Where two or more accounts share a file, the VOC files in each account could have F-type records mapping the QM name to the pathnames. This is not recommended. Instead, the account that owns the file should have an F-type record and all other accounts should have Q-type records to access the file indirectly.

 

The pathname of either or data or dictionary portion of a file may be specified as

VFS:handler:detail

to make use of the Virtual File System.

 

A summary of F-type VOC records may be displayed or printed using

LISTFShow all F-type entries
LISTFLShow only local files (in the account directory)
LISTFRShow only remote files (not in the account directory)