These examples apply to defining batch control logic within a file definition.
Example 1
The "batched transaction" data entry application example used at the beginning of this section has 3 control files 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 file ENTDTA (Entry data):
|
Example 2
The second example at the beginning of this section dealt with an order header and order lines file that were defined as follows:
|
In this structure TOTDUE (in order header) is a count of all associated VALUE fields in the order lines file. 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 file ORDLIN (order lines):
File Definition Name: |
ORDLIN |
---|---|
Batch Control File Name: |
ORDHDR |
Linked Fields In this File: |
VALUE |
Linked Fields In Control File: |
TOTDUE |
Keys to Access Control File: |
ORDNUM |