Chapter Contents

Previous

Next
The TRANSPOSE Procedure

PROC TRANSPOSE Statement


Reminder: 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> <LABEL=label> <LET>
<NAME=name> <OUT=output-data-set> <PREFIX=prefix>;


Options

DATA= input-data-set
names the SAS data set to transpose.
Default: most recently created SAS data set

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 containing 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 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, PROC TRANSPOSE creates it 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, the names of the variables are VAR1, VAR2, . . . ,VARn.
Interaction: when you use PREFIX= with an ID statement, the value prefixes to the ID value.
Featured in: Naming Transposed Variables


Chapter Contents

Previous

Next

Top of Page

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