## ROWCAT Function

**concatenates rows without using blank compression**

**ROWCAT(** *matrix<, rows<, columns>***);**

The inputs to the ROWCAT function are as follows:

*matrix*
- is a character matrix or quoted literal.

*rows*
- select the rows of
*matrix*.

*columns*
- select the columns of
*matrix*.

The ROWCAT function takes a character matrix or submatrix as its
argument and creates a new matrix with one column whose elements
are the concatenation of all row elements into a single string.
If the argument has

rows and

columns,
the result will have

rows and 1 column.
The element length of the result will be

times the element length of the argument.
The optional rows and columns arguments can be used
to select which rows and columns are concatenated.

For example, the following statements produce the

matrix shown:

b={"ABC" "D " "EF ",
" GH" " I " " JK"};
a=rowcat(b);

A 2 rows 1 col (character, size 9)
ABCD EF
GH I JK

Quotes (") are needed only if you want to embed blanks or special
characters or to maintain uppercase and lowercase distinctions.

The form

**ROWCAT(** *matrix, rows, columns***)**

returns the same result as

**ROWCAT(** *matrix***[**rows, columns**])**

The form

**ROWCAT(** *matrix, rows***)**

returns the same result as

**ROWCAT(** *matrix***[**rows,**])**

Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.