These examples apply to defining batch control logic within a table definition.
Example 1
The "batched transaction" data entry application example used at the beginning of this section has three control tables that were defined as follows:
|
In this structure BDEBIT and BCREDIT are totals of all DEBIT and CREDIT values for a particular DATE and BATCH. Likewise, DDEBIT and DCREDIT are totals of CREDIT and DEBIT values for a particular DATE.
To define this particular batch control logic requirement to LANSA the following batch control logic details should be added to the definition of table ENTDTA (Entry data):
|
Example 2
The second example at the beginning of this section dealt with an order header and order lines table that were defined as follows:
|
In this structure TOTDUE (in order header) is a count of all associated VALUE columns in the order lines table. i.e. TOTDUE is the total value of all associated invoice lines.
To define this particular batch control logic requirement to LANSA the following batch control logic details should be added to the definition of table ORDLIN (order lines):
|