Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

you have a data set like this.
data qqq;
input name $ total;
cards;
qq 22
ww 33
qq 22
ee 44
rr 33
ww 44
;
run;
and you want output like this.........
name total
qq 22
ww 44

Do it by data set step.

Answer Posted / alok karan

data qq;
do i=1 to n by n-1;
set qqq point=i nobs=n ;
output;
end;
stop;
proc print data=qq;
run;

/*Above is more efficient program to know the first and last observation */

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

1265


How to limit decimal places for the variable using proc means?

1123


if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming

1122


what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi

1141


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

1078


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

1837


How can you create a macro variable with in data step? : sas-macro

1092


what is operational data and operational system? : Sas-di

1159


What is the difference between proportion and average?

3406


What does the RUN statement do?

1351


Differentiate between format and informat? : sas-grid-administration

1123


What would be the value of month at the end of data step execution and how many observations would be there?

1234


How would you invoke a macro? : sas-macro

1189


what do the sas log messages "numeric values have been converted to character" mean? : Sas programming

1075


Are you sensitive to code walk-throughs peer review or QC review?

3201