The basic format for a File Synonym Definition item requires that you specify the first three attributes.
Attribute 1 |
A Q that identifies the type of item. |
Attribute 2 |
Name of the account where the File Definition item, as referenced in Attribute 3, can be found. If null, the file is assumed to be in the same account. |
Attribute 3 |
Name of the file, or more precisely, the item-ID of the File Definition item that identifies the file in the account specified in Attribute 2. It can reference a Q-pointer. If null, then this item points to the Master Dictionary of the account. |
The remaining attributes are the same as for a File Definition item.
File Synonym Definition items can be created in the Master Dictionary using the Editor or the SET-FILE command, as described in the next section. The following example provides a short synonym for a file:
ORD-1 001 Q 002 003 ORDERS-JANUARY |
Attribute 2 is null, indicating that the File Definition item is located in this account.
In the next example, the file is located in another account.
BK-CAT 001 Q 002 BOOK-INVENTORY 003 BOOK-CATALOG |
This Q-pointer BK-CAT references the file BOOK-CATALOG in the account BOOK-INVENTORY. Because a File Definition item need only be unique in its own account, another Q-pointer named BOOK-CATALOG could also point to the account.
If you regularly access files in another account, it can be useful to create a pointer to the Master Dictionary for that account. The next example is a Q-pointer to the Master Dictionary of the STAFF account.:
MD-STAFF 001 Q 002 STAFF 003 |
Note that the third attribute is null. Once this Q-pointer is created, you could copy items such as Procs between the two Master Dictionaries. In the following example, a Proc named ED-PROG is copied to the Master Dictionary of the STAFF account.
>COPY MD ED-PROG TO: (MD-STAFF 1 ED-PROG 1 ITEMS COPIED |
Now the item ED-PROG exists in both accounts.
See Also