Previous Page | Next Page

The TRANSPOSE Procedure

Results: TRANSPOSE Procedure


Output Data Set

The TRANSPOSE procedure always produces an output data set, regardless of whether you specify the OUT= option in the PROC TRANSPOSE statement. PROC TRANSPOSE does not print the output data set. Use PROC PRINT, PROC REPORT, or some other SAS reporting tool to print the output data set.


Output Data Set Variables

The output data set contains the following variables:


Attributes of Transposed Variables


Names of Transposed Variables

PROC TRANSPOSE uses the following rules to name transposed variables:

  1. An ID statement specifies a variable or variables in the input data set whose formatted values become names for the transposed variables. If multiple ID variables are specified, the name of the transposed variable is the concatenation of the values of the ID variables. If the DELMITER= option is specified, its value is inserted between the formatted values of the ID variables when the names of the transposed variables are formed.

  2. The PREFIX= option specifies a prefix to use in constructing the names of transposed variables. The SUFFIX= option also specifies a suffix to append to the names of the transposed variables.

  3. If you do not use an ID statement, PREFIX= option, or the SUFFIX= option, then PROC TRANSPOSE looks for an input variable called _NAME_ to get the names of the transposed variables.

  4. If you do not use an ID statement or the PREFIX= option, and if the input data set does not contain a variable named _NAME_, then PROC TRANSPOSE assigns the names COL1, COL2, ..., COLn to the transposed variables.

Previous Page | Next Page | Top of Page