Help using Base SAS procedures

Proc transpose - formatting of variables

Accepted Solution Solved
Reply
Frequent Contributor
Frequent Contributor
Posts: 94
Accepted Solution

Proc transpose - formatting of variables

Hi,

I want to tranpose a few numeric variables and I want the transposed variable to have formatted character values (instead of the default unformatted numeric value).

Any idea how to do this?

Thanks.

VD


Accepted Solutions
Solution
‎09-11-2012 07:28 AM
Respected Advisor
Posts: 3,777

Re: Proc transpose - formatting of variables

To get SAS to convert numeric variables to character (with associated formats) the VAR list must include at least one character variable.  It can be a dummy variable if you like.

var numericvar1 ... numericvarN DUMMYcharacterVar;

View solution in original post


All Replies
Solution
‎09-11-2012 07:28 AM
Respected Advisor
Posts: 3,777

Re: Proc transpose - formatting of variables

To get SAS to convert numeric variables to character (with associated formats) the VAR list must include at least one character variable.  It can be a dummy variable if you like.

var numericvar1 ... numericvarN DUMMYcharacterVar;

Frequent Contributor
Frequent Contributor
Posts: 94

Re: Proc transpose - formatting of variables

Thanks data_null_!

The dummy variable helped.


🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 244 views
  • 0 likes
  • 2 in conversation