Contents: | Main | Chapter | See Also: | Getting Started Manual | Programmer Manual |
All files have unique numbers associated with each of their entries. Defining the NUMBER field allows you to use the Internal Entry Number (IEN, also called the record number) as you would any other field. Usually, this means that someone (like Herr Doktor Ludwig Koechel in the case of the MOZART WORK file) has gone to the trouble of creating a numbering scheme for the entries. If you wish to set up a file in which a unique Internal Entry Number is always matched with each entry Name, you can do so by creating a field numbered .001 for the file:
Select FILE: MOZART WORK Select FIELD: .001 Are you adding a new FIELD? No// YES (Yes) LABEL: KOECHEL NUMBER FIELD NUMBER: .001// DATA TYPE OF KOECHEL NUMBER: NUMERIC INCLUSIVE LOWER BOUND: 1 INCLUSIVE UPPER BOUND: 626 IS THIS A DOLLAR AMOUNT (Y/N): NO// MAXIMUM NUMBER OF FRACTIONAL DIGITS: 0// HELP PROMPT: Type a Number between 1 and 626, 0 Decimal Digits. Replace DESCRIPTION: 1>
The previous dialogue is what would normally create a NUMERIC-valued field. In this case, we are describing the file's PRIMARY KEY, or Internal Entry Number.
Once such a .001 field is defined, you can create a new file entry that might look like this:
Select MOZART WORK: EINE KLEINE NACHTMUSIK Are you adding a new MOZART WORK? No// YES (Yes) KOECHEL NUMBER: 525
NOTE: The PRIMARY KEY is new with Version 22.0
More importantly, with a .001 field defined, an entry in the file can always be looked up by the Internal Entry Number (IEN), irrespective of any other cross-referencing that exists for the file. Thus:
Select MOZART WORK: 525 EINE KLEINE NACHTMUSIK
Record Numbers must always be positive and canonic -- that is, they cannot contain alpha suffixes, leading zeros, or trailing fractional zeros.
Number-meaningful lookups can be forced by prefixing the numeric input with the ` (accent grave). If Richard Green's Internal Entry Number in the PATIENT file is 355, he could be identified as follows:
Select PATIENT NAME: `355 GREEN,RICHARD
Incidentally, the .001 field example (above) illustrates how using the Modify File Attributes option can force a field to have a particular number (.001 in this case). It is done just by entering the new Number first, and then the new Label.
Reviewed/Updated: March 4, 2007