There are several guidelines for creating function strings.
If you need to customize function strings, you can do so in any class other than the system-provided classes rs_default_function_class and rs_db2_function_class.
For rs_db2_function_class, rs_iq_function_class, rs_msss_function_class, and rs_oracle_function_class, you:
You must assign a function-string class a primary site before you can create function strings for the class. The system-provided class rs_sqlserver_function_class has no primary site until you assign one using the create function string class command.
If the function-string class is a new base class, you must create function strings for all the necessary system functions before you can use the class.
You can specify an optional name for the function string. For the rs_select, rs_select_with_lock, rs_datarow_for_writetext, rs_get_textptr, rs_textptr_init, and rs_writetext functions, Replication Server uses the function-string name to uniquely identify the function strings. Function string names are unique when you qualify them fully.
If the input template is omitted for an rs_select or rs_select_with_lock function string, Replication Server matches any subscriptions that do not have matching function strings.
If you are customizing function strings for functions with replication-definition scope, you must create the function strings before you create the subscriptions.
You can put multiple commands in a language output template, separating them with semicolons.
You can batch commands for non-ASE servers.
Make sure that the database connection batch parameter has been set to allow command batching. See Replication Server Administration Guide Volume 1 > Manage Database Connections > Altering Database Connections > Set and Change Parameters Affecting Physical Connections > Change Parameters Affecting a Single Connection.
You can use Adaptive Server syntax to specify a null value for a constant in a function string.
You can increase function string efficiency when you create or alter function strings by using the none parameter to identify class-level and table-level function strings that do not have output commands. Replication Server does not execute these function strings on replicate databases.
See Replication Server Reference Manual > Replication Server Commands > create function string for the complete syntax.