Establish an Apply Engine Runtime instance as the sender on operating system A (SYSA) and an Apply Engine Runtime instance as the receiver on operating system B (SYSB). Differentiate the sender and the receiver Apply Engine scripts with the JOBNAME command.
The sender will read a source relational datastore (EMPLOYEE) and write an XML formatted target datastore to the TCP/IP port.
The receiver will receive the XML formatted source datastore from the TCP/IP port and insert the contents into a source relational store (EMP_ANALYSIS).
Sender Apply Engine Script
JOBNAME (SQD_SENDER);
DESCRIPTION SQLDDL employee.ddl AS EMPL_LAYOUT;
-- Define the source datastore --
DATASTORE EMPLOYEE
OF RELATIONAL
AS EMPL_IN
DESCRIBED BY EMPL_LAYOUT;
-- Define the target TCP/IP port on system SYSB --
DATASTORE SYSB@1820
OF XML
AS EMPL_OUT;
Receiver Apply Engine Script
JOBNAME (SQD_RECEIVER);
DESCRIPTION SQLDDL employee.ddl AS EMPL_LAYOUT;
-- Define the source datastore as a TCP/IP port on system SYSA--
DATASTORE SYSA@1820
OF XML
AS EMPL_IN;
-- Define the target datastore --
DATASTORE EMP_ANALYSIS
OF RELATIONAL
AS EMPL_IN
DESCRIBED BY EMPL_LAYOUT;