Previous Topic: DB1

Next Topic: ELM

DB2

The Database Two (DB2) context contains the fields that are in the second format of the access path to which a function is attached.

Any field in the second access path format is available for processing in the DB2 context.

The DB2 context is available only to functions that are attached to a Span (SPN) access path; the DB2 context applies to the detail file (or second format) in the SPN access path. The DB2 context is available only within an EDTTRN function to access the secondary format.

In the generated source code, the generated names of fields from the DB2 context are prefixed by the format of the appropriate DBF file.

Consider the following example. A Span (SPN) access path is created for Order and Order Detail and the second (detail) format for Order Detail contains the following relations:

FIL Order detail CPT Owned by FIL Order QTY FIL Order detail CPT Refers to FIL Product REF FIL Order detail CPT Has FLD Order quantity QTY

Order Quantity is present in the DB2 context of functions using that access path. It may be used in the action diagram where access to the database is allowed, for example:

WRK. Order quantity = DB2. Order quantity <<<