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

what is sas and what are the functions? : Sas-administrator

0 Answers  


Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.

0 Answers  


How to do user inputs and command line arguments in SAS? D&B

2 Answers   BoA, Quintiles,


how do you validate sas program?

6 Answers   Accenture,


What is the difference between proportion and average?

0 Answers   KPMG,






i have a null dataset with 20 variables. i want to upload the variables which contain name like a or k or anything in another dataset.how can we create the dataset?

3 Answers   L&T,


how does sas handle missing values in assignment statements? : Sas programming

0 Answers  


what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi

0 Answers  


What versions of SAS have you used (on which platforms)?

0 Answers   Quintiles,


Explain the use of proc gplot? : sas-grid-administration

0 Answers  


I have 50 variables in one data set, In reports i want to generate every 10 variables in one page how we will write code in proc report.

4 Answers  


what is SAS/Access and SAS/Connect?what are the uses?

3 Answers  


Categories