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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain data_null_?

699


Describe the ways in which you can create macro variables? : sas-macro

668


What are common programming errors committed in sas

761


What is the role of administrative users? : sas-grid-administration

750


how will you locate the sas platform applications? : Sas-bi

672






Explain what is data step?

814


How to create a permanent sas data set?

765


What are the advantages of using sas?

728


Give some examples where proc report’s defaults are same as proc print’s defaults?

764


What do you know about sas and what we do? : sas-grid-administration

689


Difference between sum function and using “+” operator?

700


what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming

719


what is metadata? : Sas-bi

688


what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?

1805


What is the difference between the proc sql and data step?

751