Apr 23, 2013

Concatenate Strings the Smarter way with CAT / CATX / CATT functions...

Here are the Definitions of these functions…
CAT() – Concatenates character strings without removing leading or trailing blanks
CATX() – Concatenates character strings, removes leading and trailing blanks, and inserts separators
CATT() – Concatenates character strings and removes trailing blanks
CATS() – Concatenates character strings and removes leading and trailing blanks, no seperators
The results of the CAT, CATS, CATT, and CATX functions are usually equivalent to those that are produced by certain combinations of the concatenation operator (||) and the TRIM and LEFT functions. However, using the CAT, CATS, CATT, and CATX functions is faster than using TRIM and LEFT, and you can use them with the OF syntax for variable lists in calling environments that support variable lists…
Read more in the SAS Documentation below with examples….


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.