Previous Topic: Defining a Compute Expression

Next Topic: Convert Variable

Concatenation

The *CONCAT built-in function provides the means of joining or concatenating two discrete strings of data into a single string.

For more information on concatenating numeric data without conversion to character data, see this topic, Convert Variable.

There are four parameters for this function type.

Condition

Result

*None

No blanks between the two strings

*One

Single blank between the two strings

*All

Retain all trailing blanks of the first string

CA 2E implements the *CONCAT built-in function as an RPG CAT statement. In COBOL CA 2E implements the *CONCAT function as a STRING statement.

The following example shows a concatenation function that concatenates the fields Name and Last Name and does not put any blanks between the two strings.

Concatenation

The following example shows how the concatenation appears in the Action Diagram:

Concatenation (2)