The QM File System
The files (or tables) used by QM are of two types; directory files and dynamic hashed files. Directory files do not give high performance but allow data to be accessed from outside of the QM environment. They are therefore frequently used for data interchange with other software. Dynamic hashed files offer very high performance and are typically used for the bulk of the data stored by an application. In addition, QM supports distributed files which are a way of viewing a collection of separate hashed files as though they are one file.
Facilities are provided to create data files, enter, modify and retrieve data, produce reports and, where the data processing operation required cannot be achieved using the standard commands, to construct powerful programs with the minimum of effort.
Most files consist of two parts; a data part holding the actual data and a dictionary part holding a description of the structure of data records. Files do not have to have both parts. Files with no dictionary portion are fairly common. Dictionaries with no data part usually exist only to provide a single dictionary common to the data portion of many files. Multiple files that have identical data structure may share a single dictionary.
For compatibility with other multivalue database products, QM also supports multifiles. These are a collection of data files that share a common dictionary where the component files are referenced by a two part name consisting of a file name and a subfile name separated by a comma. See the CREATE.FILE command for further details.
Files contain data stored as records which are the basic unit of file access. Each record has a record id (or key) which must be unique within the file. A record id may contain any character except the mark characters (chars 251 to 255) or the ASCII NUL character (char 0). Null record ids (zero length) are not allowed in QM and the key length must not exceed the setting of the MAXIDLEN configuration parameter. If the system is in ECS mode, characters outside the 8-bit character set are only valid for files configured in ECS mode.
Special Filename Syntaxes
Normally, QM commands that reference files use a file name that corresponds to an F or Q-type VOC entry which, in turn, references the actual operating system file to be accessed. There are four special extended syntaxes for filenames that allow access to files without needing a VOC entry. Use of these is controlled by the FILERULE configuration option. Users should consider any impact on the security of their system before enabling these.
The four extended syntaxes are:
Note that in the pathname form, depending on context, Windows users may need to use forward slash characters (/) as directory delimiters because the backslash (\) is reserved as a string quote. Alternatively, the entire "PATH:pathname" construct can be quoted.
Because some VFS handlers may need to process filenames that include spaces (e.g. DICT name), any tilde characters (~) in the qualifier of a VFS reference will be replaced by spaces.
These special syntaxes cannot be used with a multifile component name.
For details of file processing from QMBasic programs, see File Processing.