Help using Base SAS procedures


Not applicable
Posts: 0


data tran
input acc date $ emi dpd;
101 nov08 90 0
101 dec08 80 1
101 jan09 45 0
102 nov08 89 0
102 dec08 89 1
102 jan09 78 2

Hi i am having a dataset i wnat to transpose this but i wnat to transpose two variable .i wnat the output like this

acc nov08 dec08 jan09 nov_emi dec_emi jan_emi
101 90 80 45 0 1 0
102 89 89 78 0 1 2

i have done by transposing emi and then i have taken another datset and again traspose the dpd then i have merged it.

But i wnat this in Transpose
Super Contributor
Super Contributor
Posts: 3,176

Re: Reg:Transpose

Posted in reply to deleted_user
Appears you have multiple, unique PREFIX= requirements for your transposed variables, therefore you must consider two PROC TRANSPOSE executions with a DATA step to MERGE the outputs together creating the columns you have listed.

Below is a link to one of several technical/conference papers found on the SAS support website to consider.

Scott Barry
SBBWorks, Inc.

Changing the Shape of Your Data: PROC TRANSPOSE vs. Arrays
Bob Virgile, Robert Virgile Associates, Inc.
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation