The
system function VGLib.concatenateBytes concatenates
two fields.
As is true in
StrLib.concatenate, the source
and target may be of a character type. In the current function, the
source also may be any of the following types:
- BIN (or the integer equivalents BIGINT, INT, and SMALLINT)
- DECIMAL
- NUM
- NUMC
- PACF
StrLib.concatenateBytes(
target a character type inOut,
source BIN, DECIMAL, NUM, NUMC, PACF, or a character type in)
returns (result INT)
- result
- Numeric field that receives one of the following values (defined as type
INT or the equivalent: type BIN with length 9 and no decimal places) returned
by the function:
- -1
- Concatenated output is too long to fit in the target field and the output
was truncated, as described later
- 0
- Concatenated output fits in the target field
- target
- Target field.
- source
- Source field or literal.
When two values are concatenated, the following occurs:
- Any trailing spaces or nulls are deleted from the target value
- The source value is appended to the value produced by the previous step
- If the output produced by the second step is longer than the target field,
the output is truncated. If the output is shorter than the target field, the
output is padded with blanks, even if the output is a number