TEXT_SUBSTITUTE

LANSA Composer

TEXT_SUBSTITUTE

This Activity reads a skeleton text file and replaces %%parm.parmeter%% references in the text with the current parameter value and writes the expanded text file.

This Activity can be used to create a skeleton text for such things as email body text or email attachments. The complete text can then be resolved at execution time with the current execution parameter values.

Skeleton file contents example:

Thank you %%PARM.CUSNAME%% for your order.

Your order, numbered  %%parm.orderno%% has been dispatched via carrier %%parm.CARRIER%%.

 

If parameter values were:

CUSNAME        John Brown

ORDERNO        AB0015

CARRIER        FEDEX

 

then the resulting text file would be:

Thank you John Brown for your order.

Your order, numbered AB0015 has been dispatched via carrier FEDEX.

 

INPUT Parameters:

TEXTSKELETON : Required

Path and file name of the skeleton text file.

For example:   c:\mydir\emailtext.txt

TEXTFILE : Required

Path and file name of the text file to be created.

For example:   c:\mail\orderemail.txt

TEXTCCSID : Optional

This parameter applies only on IBM i servers.  It allows you to specify the IBM i CCSID with which the output text file is created.

If the parameter is not specified, a default of *SKELETON is assumed, which instructs the activity to create the output text file using the same CCSID as the skeleton text file.

You can also specify special values of *DEFAULT or *JOB which cause the activity to use the default CCSID for the job in which the activity is executing.

Otherwise, you should specify the numeric CCSID value required.  For example, a value of 1208 means UTF-8.  Refer to IBM i documentation for a complete list and description of the available CCSIDs.

NOTE:  the assumed or explicit CCSID is applied only when the specified output file does NOT already exist.  If the specified output file already exists and is being replaced by this activity, then its CCSID will not be changed.

OUTPUT Parameters:

There are no output parameters.