File reference (Access Query Language)

A file reference is a standardized mechanism for designating a particular file within D3.

There are a number of ways to reference files within D3. Any command that requires or allows a file reference accepts any of the following references:

filename Accesses the data section of a given file.
dict filename

DICT filename

Accesses the dictionary level of the file.
dict.filename,data.filename Accesses a data section in the given dictionary, when the data section’s name is different than the dictionary’s name. This is the case when a file has multiple data sections.

In all of the above cases, it does not matter to D3 if the file is local or remote. The D-pointer can reside in the current master dictionary or elsewhere. This account has a Q-pointer already present in the current master dictionary.

D3 File References and File Paths

The following file reference formats are available in D3, and make use of the new feature called file paths.

account.name,,

Accesses another master dictionary (account), or any file-defining item found in the mds file.

Alternately, the fully-qualified form is also valid for referencing another master dictionary:

mds,md.name

account.name,filename,

Accesses the data section of the specified file in the designated account. The account name must exist as a D-pointer in the mds file and the file name must exist as a D-pointer in the given account. Note the , (comma) at the end of the reference; the file reference is invalid without it.

The data level reference is not required, but the trailing comma must be included:

list dm,bp,

This is the same as:

list dm,bp,bp
dict account.name,filename, Accesses the dictionary section of the specified file in the designated account. The account name must exist as a D-pointer in the mds file and the file name must exist as a D-pointer in the given account. Note the , (comma) at the end of the reference; the file reference is invalid without it.

Specifying Alternate File Names

File references within certain processes, such as copy and filing operations, require a leading ( (left parenthesis) in cases where an alternate file reference is to be designated.

A variety of commands allow or require the character, including: copy (TCL), me (merge, in Editor processor), CTRL+CR (Update processor), CTRL+CW (Update processor), CTRL+ZR (Update processor), CTRL+ZW (Update processor), sreformat (AQL), reformat (AQL), fi (Editor processor), and fs (Editor processor).

Example(s)

The left parenthesis is vital in this operation. It indicates that the string immediately following it (customer, in this case) is to be treated as an alternate file name. Without the ( character, customer is treated as an item-ID and item-ID 100 would subsequently be copied to customer in the data section of the entity file.

list entity
list dict entity
list invoices,archive
list dm,,
list dm,bp,
list dict dm,entity,

copy entity ’100’
to: (customer 120

The ( indicates that the copy is to be directed to a different file.

copy entity ’100’
to: (production.account,entity, ’120’