SUBSTITUTE

LANSA Composer

SUBSTITUTE

This activity formats an input string, replacing variable placeholders in the form &1, &2 ... &9 with specified values, which may be specified as literals or variables.

NB:  This activity performs a very similar function to the SUBSTITUTE_VAR activity but uses a different means of specifying the variable data to be substituted into the string.  You can use either activity according to your requirements or preference.

INPUT Parameters:

STRINGIN : Required

This parameter specifies the string that is to be formatted.  The string may contain placeholders in the form &1, &2 ... &9 that will be replaced by the values of the corresponding variable parameters.

For example, if you specify the string "&1 files processed from &2", the placeholders &1 and &2 will be replaced by the values of the VARIABLE1 and VARIABLE2 parameters in the resulting formatted string.

VARIABLE1VARIABLE2
VARIABLE3

VARIABLE4

VARIABLE5

VARIABLE6

VARIABLE7

VARIABLE8

VARIABLE9
: Optional

These parameters may be used to specify the values that are to replace the variable placeholders in the format string.  For example, the value of VARIABLE1 will replace each instance of &1 in the format string, while the value of VARIABLE2 will replace each instance of &2 and so on.  You only need to specify values for as many variables as you have specified variable placeholders in the format string.  However, they must be specified contiguously (the activity stops looking after the first parameter whose value is not specified).

OUTPUT Parameters:

STRINGOUT :

Upon completion, this parameter will contain the formatted string.