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

what are different analysis datasets you created and what are the new variables created

2 Answers   Sciformix,


Can you calculate the mean, median and mode of the following data set using data step logic? Don't use any function or procedure. data a; input age @@; datalines; 22 32 32 32 43 23 24 56 45 54 28 29 27 26 25 28 30 20 18 37 36 47 46 56 19 20 ; run; I have calculated the mean which i have posted in the answer section.

6 Answers   HSBC,


Explain data_null_?

0 Answers  


How do you add a number to a macro variable? : sas-macro

0 Answers  


Mention few ways with which a “table lookup’ is done in sas programming.

1 Answers  






Can you continue to write code while the rest of the people on the floor where you work have a noisy party to which you were not invited?

2 Answers   Oracle,


How to convert HTML file into SAS dataset?

0 Answers  


What are the applications primarily used by business analyst? : Sas-bi

0 Answers  


how can get the first and last observations in a dataset using Proc SQl?

4 Answers   Satyam,


how do you pull data from equifax?tell me the process?

0 Answers   Synchrony Financial,


what is the use of proc contents and proc print in sas? : Sas-administrator

0 Answers  


Which is the best training institute for SAS in Delhi. Please reply

12 Answers   HCL, HSBC,


Categories