how to shift the rows to cols?
eg:
i have like
field1 field2 field3
10 20 20
this should be displayed as
field1 10
field2 20
field3 30
(without the obs col)

how do this?can i use transpose or tell me suitable way to
do this?

Answers were Sorted based on User's Feedback



how to shift the rows to cols? eg: i have like field1 field2 field3 10 20 20 this sh..

Answer / luclyl

proc transpose data=hyd out=mum (drop=_NAME_);
var a b c;
run;

Is This Answer Correct ?    7 Yes 2 No

how to shift the rows to cols? eg: i have like field1 field2 field3 10 20 20 this sh..

Answer / haritha

by using proc transpose procedure


ur data should be like this

data hyd;
input a$ b$ c$;
datalines;
field1 field2 field3
10 20 30
;
run;

solution will be like this:
proc tranpose data=hyd out=mum;
var a b c;
run;
proc print data=mum noobs;
run;

Is This Answer Correct ?    5 Yes 2 No

how to shift the rows to cols? eg: i have like field1 field2 field3 10 20 20 this sh..

Answer / guest

you can also use arrays to shift rows into columns.

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More SAS Interview Questions

How to save the log information in a file for future use

2 Answers   HCL,


What is the difference between class statement and by statement in proc means?

0 Answers  


what is sas olap server? : Sas-di

0 Answers  


what is study design in while working with SAS? what are screening variables in SAS?

0 Answers   MSCR,


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

0 Answers  






If reading a variable length file with fixed input, how would you prevent SAS from reading the next record if the last variable didn’t have a value?

3 Answers   Accenture,


how sas deals with business intelligence? : Sas-bi

0 Answers  


What is SAS? is it a software just for use or we can creat something over there?

5 Answers   Cognizant,


wat has been most common programming mistake?

3 Answers  


What is the difference between input and infile statement?

0 Answers  


How does the internal authentication work in sas? : sas-grid-administration

0 Answers  


What is the SAS data set?

0 Answers  


Categories