File Synonym Definition Item

A file synonym definition item, also known as a Q-pointer, points to a file definition item in the same, or another account, allowing a user to access the same file using a different file-name. The account can be local or remote, or the Q-pointer can specify a remote database directly, without the need to create a remote account.

For example, suppose you have a file called CUSTOMER in your account and you wish to access a file in another account also called CUSTOMER. Reality does not allow you to have two items in the same account MD with the same name. You can, however, create a Q-pointer with a different name, for example, CUSTOMER2, which points to the CUSTOMER file in the other account. You can then access both files from your account.

It may also be useful to create a Q-pointer to a file in the same account. For example, suppose there is a file called INVENTORY-HISTORY. It may be convenient to create a Q-pointer with a shorter item-id, such as 'IH'.

A temporary or permanent Q-pointer can be created using the SET-FILE command. Additionally, you can reference a file on another account by prefixing the file name with /account/ (see Introduction to Reality).

Item Format

Attribute Description
Item-id The name by which the file defined in attribute 3 is to be accessed.
  001 Q
  002 Name of account in which the file definition item of the file to be accessed is found. If null, Reality defaults to the account containing this Q-pointer.
  003 Name of file to be accessed (fileName{,dataSection}). If null, Reality defaults to the MD of the account named in attribute 2.
  004 Null
  005 Retrieval lock code(s)

Single Level Dictionary File

The MD of an account contains a File Synonym Definition Item that points to itself; it has the name MD and does not specify an account or filename. It is used by commands such as SORT, LIST and SELECT to reference the MD without using the DICT file modifier. Without it you would have to type LIST DICT MD instead of LIST MD.

A single level dictionary file (created with CREATE-FILE DICT) contains a Q-pointer that serves a similar purpose.

Remote File Synonym Definition Item

The remote file synonym definition item is a Q-pointer which enables a file on a remote system to be referenced without first needing to explicitly reference the host system on which it resides. The location of the file is implicit in the Q-pointer.

Implicitly Specified Remote System

The following Q-pointer format points to a file on a specified remote system without the need for a separate R-pointer:

Attribute Description

Item-id

The name by which the remote file, specified in attribute 3, is to be accessed.

  001

Q

  002

@system/account where system is the name of the remote database in the ROUTE-FILEClosed /etc/ROUTE-FILE is a file on a UNIX host containing items that control the routing a particular process will take through a network. Routing control includes destination system names, network addresses, etc. On Windows hosts, this information is held in the Registry. For Reality external components that use the PC Standard Network Interface for Windows (PCSNI), routing information is held in a file called winsni.ini in the Windows folder.  and account is the name of the account containing the referenced file.

  003

Name of referenced file.

Implicitly Specified Local System

For consistency the following Q-pointer format is also supported to reference a file on the local system:

Attribute Description

Item-id

The name by which the file specified in attribute 3 is to be accessed.

  001

Q

  002

@*/account where account is the name of the account containing the referenced file.

  003

Name of referenced file.

This is equivalent to the standard file synonym definition item.

See Also

File Definition Item.