how to rearrange the data as our wish by using dataset block?

Answers were Sorted based on User's Feedback



how to rearrange the data as our wish by using dataset block? ..

Answer / xyz

use retain statement before the set statement

Is This Answer Correct ?    5 Yes 1 No

how to rearrange the data as our wish by using dataset block? ..

Answer / srinivas anumalla

Probably there are many options,like id statement,proc sort.
As Some body said retain is not for that operation.

But i strongly suggest Proc sort.

Is This Answer Correct ?    1 Yes 0 No

how to rearrange the data as our wish by using dataset block? ..

Answer / raaman

data Temp;
input Sno Sname $ Eng Maths Sci Soc;
cards;
1212 Smith 67 78 89 98
2334 Lisa 78 89 99 87
;
run;

data Temp1;
retain Sname Sci Eng Maths Soc Sno;
set Temp;
run;

proc print data = Temp1;
title "1.Use of Retain Statement";
run;

use retain statement before the set statement

Is This Answer Correct ?    1 Yes 0 No

how to rearrange the data as our wish by using dataset block? ..

Answer / nani

by using id statement
proc print data=dsn;
id var3 var5 var1;
run;

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More SAS Interview Questions

If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable?

3 Answers  


How would you remove a format that has been permanently associated with a variable? ________________

5 Answers   Quintiles, TCS,


How do you add a number to a macro variable?

3 Answers  


what are the component of range? : Sas-bi

0 Answers  


How do you add a prefix to some or all variables in a dataset using a SAS macro?

2 Answers  






What do you feel about hardcoding?

1 Answers  


what is p-value

3 Answers   Accenture, Quintiles, Sristek,


Are you involved in writing the inferential analysis plan? Tables specfications?

0 Answers  


What is the difference Using & and && in the macro variables

5 Answers   Accenture,


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?

6 Answers  


Tell e how how dealt with..

0 Answers  


what is the primary variable in your study?

3 Answers   Accenture,


Categories