Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

LANSA file definitions can contain 3 types of fields:

  • Traditional or "real" fields 

These are the normal fields found in any IBM i file definition and are assembled together to form the record format of the associated physical file. Such fields actually exist in the database file and their content (or value) can be extracted from any record in the file at any time.

  • "Virtual" fields 

These are fields that do not actually exist in the IBM i database file, but are dynamically derived from "real" fields in the file.

  • "Predetermined join" fields 

For information, refer to to 3.14.1 What Is a Predetermined Join Field? in Access Routes to Other Files.

The distinction between "real" and "virtual" fields can be best illustrated by example.

Consider an accounting file called ACCMST that contains an 8 digit field called CHTACC (chart of accounts) that looks like this:

No Format
nopaneltrue
                 _________________________________

...


                 | 0 | 8 | 6 | 3 | 4 | 3 | 1 | 2 |

...


                 _________________________________

...


This example is for chart of accounts number 08634312. In actual fact the chart of accounts has 3 components. These are: a 2 digit company number (08), a 2 digit division number (63), and a 4 digit cost center (4312).

Since the company number, division number and cost centre can be "derived" directly from the chart of accounts number it would be possible to define in file ACCMST three "virtual" fields called COMPNO, DIVNUM and COSTCT.

If this was done the definition of file ACCMST would contain:

...