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

Differences between where and if statement?

0 Answers  


how to do user inputs and command line arguments in sas?

0 Answers   D&B, TCS,


What is the pound sign used for the DATA _NULL_?

14 Answers  


What is the maximum and minimum length of macro variable

0 Answers  


What is the difference between an informat and a format? Name three informats or formats.

13 Answers   Accenture, IBM,






What techniques and/or PROCs do you use for tables?

4 Answers   Oracle,


What is the role of sas grid administrator? : sas-grid-administration

0 Answers  


What is the difference between INPUT and INFILE ?

0 Answers  


Explain the difference between nodup and nodupkey options?

0 Answers  


Which date functions advances a date time or date/time value by agiven interval?

3 Answers  


how to generate report for 0 observation dataset?

3 Answers   Mind Tree, Student,


What is the difference between Regression and Logistic Regression? Can u explain the Assumptions/Conditions?

3 Answers  


Categories