Also known as Q-pointers, synonym-defining items are used in account master dictionaries to point to other files. A Q-pointer is a file alias that defines a path to an existing file that resides in the system under another name, or in another account, or both. A Q-pointer can reference any file in the system, including those within the same account.
Synonym-defining items reside in the account’s master dictionary. In general, only the first four attributes are used (attributes 0, 1, 2, and 3).
Attribute | Description |
---|---|
0 | Item-ID of the synonym. |
1 | Dictionary code. Contains the character q to indicate that the current item is a synonym-defining item. |
2 | Account (master dictionary) where the item-ID of the file named in attribute 3 resides. If the account name is not specified, the current account is used for the destination account. |
3 | Name of the file to which the item points. If the file name is not specified, the item-ID (synonym name) is used for the destination file. If no such file name exists, then the current account master dictionary is used for the destination file. |
A Q-pointer can reference another Q-pointer, which references yet another Q-pointer, for up to 15 aliases away. Ensure that the aliases do not eventually refer back to each other. If it does, the system reports the error [230]. D3 also provides dynamic file paths, which prevents having to create a Q-pointer to look at a file elsewhere in the system.
This points to the cust file in the production account.
cust 001 q 002 production 003 cust
This points to the history data section of the cust file in the production account.
ch 001 q 002 production 003 cust,history
This points to the prod file in the production account, if it exists, otherwise it points to the master dictionary level file in the production account.
prod 001 q 002 production
This points to the customer-file in the current account. Note that attribute 2 is null, which indicates the current master dictionary.
cust 001 q 002 003 customer-file