TRIM removes trailing spaces etc, so if VAR1= '1234 ', you can create a new variable in the data step VAR2= TRIM(VAR1) will take out the space after 1234.
CONCAT Function
performs elementwise string concatenation
CONCAT( argument1, argument2, argument15>)
where arguments are character matrices or quoted literals.
The CONCAT function produces a character matrix containing elements that are the concatenations of corresponding element strings from each argument. The CONCAT function accepts up to 15 arguments, where each argument is a character matrix or a scalar. All nonscalar arguments must conform. Any scalar arguments are used repeatedly to concatenate to all elements of the other arguments. The element length of the result equals the sum of the element lengths of the arguments. Trailing blanks of one matrix argument appear before elements of the next matrix argument in the result matrix.