Note: Built-In Function Rules Usage Options
Concatenates up to five alphanumeric strings to form one string as a return value. No truncation of trailing blanks is performed by this function.
Arguments
|
Return Values
|
Technical Notes
This Built-In function contains two consecutive operations:
1. Concatenate the input strings.
The length of the resulting string then is put into the second returning field (if it is provided). The concatenation goes through all the input strings unless the length of the resulting string is bigger than the maximum possible length of the first returning field type. In this case, the concatenation will stop and the second returning field will have the value of the maximum possible length of the first returning field type.
2. Assign the resulting string into the first returning field.
If the length of the returning field is smaller that the length of the resulting string, the last will be truncated.
Therefore, the value of the second returning field is not the length of the string in the first returning field.
For the maximum possible length of a field type please refer to Field Type Considerations.
Examples
USE BUILTIN(CONCAT) WITH_ARGS(#VAL1 #VAL2 #VAL3 #VAL4 #VAL5) TO_GET(#VAL6 #SIGN150)
|
In Example 1, all 5 input fields contain 2 characters strings. Even the #VAL6 can take up to only 7 bytes, the #SIGN150 gets back 10, which is 2 +2 +2 +2 +2.
In Example 2, the concatenation stops at #VAL2 because the resulting string length is bigger than 256, which is the maximum possible length of an Alphanumeric field (#VAL6 type). #The SIGN150 value is 256.
In both examples #VAL6 returns only 7 characters.