| subvalue mark | Index Level | sysbase |
| Syntax | |
| Category | Definitions |
| Type | Definition |
| Description |
also known as "q-pointers," are used in account master dictionaries to point to other files.
Essentially, a "q-pointer" is a file alias which defines a pathway to an existing file which resides in the system under another name, or in another account, or both. A "q-pointer" may 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 0 (zero) is the item-id of the synonym. Attribute 1 (one) is called the "d/code" attribute. It contains the character "q" to indicate that the current item is a synonym-defining item. Attribute 2 is the name of the account (md) where the item-id of the file named in attribute 3 resides. If the account name is not specified, the current account will be used for the destination account. Attribute 3 is the 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 md is used for the destination file. A "q-pointer" may reference another "q-pointer", which references yet another "q-pointer", for up to 15 aliases away. Care should be taken to ensure that the aliases do not eventually refer back to each other. If it does, the system will report the error [230]. Pick also provides dynamic file "paths", which prevent having to create a "q-pointer" to simply look at a file elsewhere in the system. |
| Options | |
| See Also | q-pointer list-files create-nqptrs filename mds sysprog-bp set-file listfiles account check-dx file.reference set-dptr touch sysprog-pl system system-errors qs-pointer |
| Example |
cust
001 q 002 production 003 cust This points to the "cust" file in the production account. ch 001 q 002 production 003 cust,history This points to the "history" data section of the "cust" file in the production account. prod 001 q 002 production This points to the "prod" file in the "production" account, if it exists, otherwise it will point to the "md" level file in the "production" account. cust 001 q 002 003 customer-file This points to the "customer-file" in the current account. Note that attribute 2 is null, which indicates the current md. |
| Warnings | Q-pointers point only to other files, not commands. To create a synonym for a command, use a macro. |
| Compatibility | D3 7.0 AP R83 |
| subvalue mark | Index Level | sysbase |