file.reference

Definition/General, Releases: AP and R83

How to reference files in Pick.

Description

a standardized mechanism for designating a particular file within Pick. This explains the forms that a file reference can take.

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

1) filename

This form of a file reference accesses the data section of a given file (see example 1).

2) dict filename
DICT filename

These forms access the dictionary level of the file (see example 2).

3) dict.filename,data.filename

This 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 (see example 3).

In all of the above cases, it does not matter to Pick if the file is 'local', meaning that the 'd-pointer' resides in the current md, or 'remote', meaning that the file 'd-pointer' exists elsewhere, yet this account has a 'q-pointer' already present the current md.

AP File References and File Paths:

All of the following file reference formats are available only in Advanced Pick, and make use of the new feature called 'file paths'. Note that these forms are not available in R83.

4) account.name,,

This accesses another md (account), or any file-defining item found in the 'mds' file (see example 4).

Alternately, the 'fully-qualified' form is also valid for referencing another md:

mds,md.name

5) account.name,filename,

This 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 filename must exist as a 'd-pointer' in the given account (see example 5). Note the ',' 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

6) dict account.name,filename,

This 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 filename must exist as a 'd-pointer' in the given account (see example 6). Note the ',' at the end of the reference; the file reference is invalid without it.

Specfiying 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. (see examples 7 and 8).

A variety of commands allow or require the '(' character, including: 'copy' (TCL), 'me' ('merge', in line editor), '<ctrl>+cr' (UP), '<ctrl>+cw' (UP), '<ctrl>+zr' (UP), '<ctrl>+zw' (UP), 'sreformat' (Access), 'reformat' (Access), 'fi' (editor), and 'fs' (editor).

Example

list entity

list dict entity

list invoices,archive

list dm,,

list dm,bp,

list dict dm,entity,

copy entity '100'
to:(customer 120

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.

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

As in example 7, the '(' parenthesis character indicates that the
copy is to be directed to a different file.

See Also

Command Name Type Description
file.defining.items Definition File-defining item overview.
tcl.catalog Verb: Access Creates 'verb' item for a Pick/BASIC program.
access.hash-test Verb: Access Performs distribution analysis on file with test modulo.
access.istat Verb: Access Performs distribution analysis on existing file modulo.
tcl.set-file Verb: Access Creates temporary 'q-pointer' called 'qfile'.
tcl.compare Verb: Access Compares items.
up.options.c Option Clears screen between each item.
access.footing Modifier Defines report footing.
tcl.exchange Verb: Access Swaps item-ids.
up.options.i Option Includes item-id in Update processor.
tcl.compile-run Verb: Access Compiles and runs a Pick/BASIC program.
access.list-label Verb: Access Produces formatted labels.
access.id-prompt Modifier Includes item-id in Update processor.
access.count Verb: Access Counts items in a file.
access.list-item Verb: Access Displays item in storage format.
access.list Verb: Access Lists file.
pc.b Processing Code Defines horizontal file relationship.
access.verbs Definition General form of Access sentences.
tcl.lfd Verb: Access Lists file descriptions from specified file.
tcl.import.dos Verb: Access Transfers DOS file to Pick item.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.