Show TOC

Function and Function String CommandsLocate this document in the navigation structure

You can use function strings to program Replication Server to execute customized commands at destination databases.

A function is a name associated with a data server operation. For example, rs_insert is the system function that inserts a row in a table, and rs_begin is the system function that initiates a transaction. System functions can manipulate data, as does rs_insert, or control transactions as does rs_begin.

Replication Server uses a template called a function string to construct the commands it submits to a database. At runtime, variables in the function string are replaced with values from the function.

A function-string class groups function strings for use with a database. For example, a function-string class might group all of the function strings for a vendor’s data server or for a department’s tables. Replication Server provides function-string classes for Adaptive Server and DB2 databases.

Use create connection to associate a function-string class with a database. Use alter connection to change a function-string class.

Note

The default function-string class for Adaptive Server databases, rs_sqlserver_function_class, is assigned when you add a connection using rs_init.

You can create a new function-string class that inherits function strings from an existing class. Then you can customize only the function strings for which you want to specify non-default behavior, as your database or application requires.