String Concatenation:CONCATENATE

  Define Data

Over View

CONCATENATE is a command to combine strings. Handle strings
It can be used with Char, Numeric, Dats, Time and String variables.
How to simply combine the strings, delimiter between the combined strings
There are a method of inserting and a method of inserting a space according to the length of the data type.
Let’s explain each with sample code.

Sample Code:String Concatenation


This example is simple concatenation.
The value ‘ABC’、’DEF’ and ‘GHI’ concatenate to variable:V_CHAR so it will be ‘ABCDEFGHI’.

Sample Code:String Concatenation(Separate)


In this example, when combining strings, they are separated by; (semicolon) by the SEPARATED BY option.
Because a (semicolon) is inserted between the letters’ABC ‘,’ DEF ‘, and’GHI’
The result is’ABC; DEF; GHI ‘.
The delimiter character can be any character such as Space (blank), or (comma).

Sample code: Combining character strings (automatic space insertion)


In this example, the RESPECTING BLANKS option is used when combining strings.
The result looks like’ABC DEF GHI ‘.
The RESPECTING BLANKS option is an option that automatically fills spaces according to the data length.
It may not be useful when you want to output a fixed length file.
However, this command is relatively new and cannot be used per ECC 6.0.