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 does sas handle missing values in an update? : Sas programming

1 Answers  


What commands are used in the case of including or excluding any specific variables in the data set?

0 Answers  


To what type of programms have you used scratch macros?

0 Answers   Novartis,


What is the order of application for output data set options, input data set options and SAS statements?

0 Answers   Quintiles,


Mention what is SAS data set?

0 Answers  






How is character variable converted into numeric variable and vice versa?

0 Answers  


what is washout period?

3 Answers   Cognizant,


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

5 Answers   Cognizant,


What makes sas stand out to be the best over other data analytics tools?

0 Answers  


Mention the difference between ceil and floor functions in sas?

0 Answers  


What is highest missing value for numeric?

1 Answers  


what is change analysis in sas di ? : Sas-di

0 Answers  


Categories