TEXTFILES_COMBINE

This activity can combine one or more text documents into one aggregate document.  It copies each line of text data from each source file specified into the specified target document, adding the specified line terminator after each line.

For certain types of text documents it can be useful for aggregating individual transactions document files into one for, say, sending to a trading partner.  (Note, it will usually be possible to do the same thing using a Transformation Map, but using this activity might be simpler in many cases.)

On IBM i servers, the target (aggregate) document file will be created with the same CCSID value as the first source document file, unless you are appending to an already existing target document.

INPUT Parameters:

TXTTARGET: Required

This parameter must specify the path and name for the target (aggregated) text document file.  The file will be created if it does not exist.  If it does exist it will be replaced, unless you specify *YES for the TXTAPPEND parameter, in which case the activity will append the specified source documents to the existing contents.

TXTSOURCE: Required

This parameter must specify a list of one or more source text documents whose contents are to be combined into the specified target aggregate document file.  The source files will be combined in the order in which you specify them in the supplied variable list.

TXTAPPEND: Optional

If the specified target document file already exists, then you can specify *YES for this parameter to cause the activity to append the new source documents to the end of the existing contents of the file.  Otherwise the target file is replaced with the new contents.  If the specified target file does not already exist, then this parameter is ignored.

TXTLINETERMINATOR: Optional

This parameter specifies (on IBM i platforms only) the line terminator that is written at the end of each line of the target aggregate document.  You may specify one of the following values:

*CRLF: a carriage return/line feed pair (this is the default value)

*LFCR: a line feed/carriage return pair

*CR: a carriage return

*LF: a line feed

*NL: a new line character

This value affects the line terminators in the target document only.  When reading the source text document, the activity will be sensitive to any standard line terminators.

NOTE: On Windows server platforms, all the line terminator options (*CRLF, *LFCR, *CR, *LF, *NL) result in a carriage return/line feed pair.  The distinct line terminator options are not supported.

OUTPUT Parameters:

There are no output parameters.