When dealing with strings, multiple variables may need to be joined together with some form of concatenation function. We will explore some of these options in the following sections.
Concatenation
CAT
We explored COALESCE and related functions to help us choose from multiple values. However, there are other instances when we want to join observations together. Earlier, the concatenation operator (||) was mentioned when we showcased the difference between the Compress, Strip, and Trim functions. The CAT function is a built-in function in SAS to help join observations. Let's compare it with the use of the concatenation operator in the following code block:
73 Data _Null_;
74 A = "This ";
75 ...