Previous Page | Next Page

The TRANSPOSE Procedure

PROC TRANSPOSE Statement


Tip: You can use data set options with the DATA= and OUT= options. See Data Set Options for a list.

PROC TRANSPOSE <DATA=input-data-set> <DELIMITER=delimiter> <LABEL=label> <LET>
<NAME=name> <OUT=output-data-set> <PREFIX=prefix> <SUFFIX=suffix>;

Options

DATA=input-data-set

names the SAS data set to transpose.

Default: most recently created SAS data set
DELIMITER= delimiter

specifies a delimiter to use in constructing names for transposed variables in the output data set. If specified, the delimiter will be inserted between variable values if more than one variable has been specified on the ID statement.

Alias: DELIM=
See Also: ID Statement
LABEL= label

specifies a name for the variable in the output data set that contains the label of the variable that is being transposed to create the current observation.

Default: _LABEL_
LET

allows duplicate values of an ID variable. PROC TRANSPOSE transposes the observation that contains the last occurrence of a particular ID value within the data set or BY group.

Featured in: Naming Transposed Variables When the ID Variable Has Duplicate Values
NAME= name

specifies the name for the variable in the output data set that contains the name of the variable that is being transposed to create the current observation.

Default: _NAME_
Featured in: Naming Transposed Variables
OUT= output-data-set

names the output data set. If output-data-set does not exist, then PROC TRANSPOSE creates it by using the DATAn naming convention.

Default: DATAn
Featured in: Performing a Simple Transposition
PREFIX= prefix

specifies a prefix to use in constructing names for transposed variables in the output data set. For example, if PREFIX=VAR, then the names of the variables are VAR1, VAR2, ...,VARn.

Interaction: When you use PREFIX= with an ID statement, the variable name begins with the prefix value followed by the ID value.
Featured in: Naming Transposed Variables
SUFFIX= suffix

specifies a suffix to use in constructing names for transposed variables in the output data set.

Interaction: When you use SUFFIX= with an ID statement, the value is appended to the ID value.

Previous Page | Next Page | Top of Page