Help using Base SAS procedures

Reg:Transpose

Reply
N/A
Posts: 0

Reg:Transpose

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


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,174

Re: Reg:Transpose

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 http://support.sas.com/ website to consider.

Scott Barry
SBBWorks, Inc.

Changing the Shape of Your Data: PROC TRANSPOSE vs. Arrays
Bob Virgile, Robert Virgile Associates, Inc.
http://www2.sas.com/proceedings/sugi24/Begtutor/p60-24.pdf
Ask a Question
Discussion stats
  • 1 reply
  • 104 views
  • 0 likes
  • 2 in conversation