Creating a Procedure for IBM i (AS/400) Individual Member Replication

To use the Data Replicator and StarSQL or later to replicate to or from individual IBM i (AS/400) file members, you must perform a one-time registration procedure on the Db2 for i database, as shown below.

CREATE PROCEDURE QSYS.QCMDEXC(IN :CMDSTR VARCHAR(1024),IN:CMDLENGTH
DECIMAL(15,5)) EXTERNAL NAME QSYS.QCMDEXC
LANGUAGE C GENERAL

You can specify a value that is larger than 1024 for VARCHAR, but do not use a smaller value.