INVOKE: Example 3
In an off-line batch job, a log table is filled with data on the basis of records in an on-line entry table that have received the 'CHANGED' status as a result of on-line manipulation. The component performs a calculation or other operation involving non-SQL data sources. The component could well use the query protocol and return multiple rows for each input row.
INSERT INTO log-table( column1, column2 )
INVOKE component.method WITH
SELECT column1, column2
WHERE status = 'CHANGED'
In this example the component is invoked as many times as there are records in the on-line entry table that have the 'CHANGED' flag. The number of output records depends on the external component definition. The moment of execution depends on the execution of the batch job.