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...


i have a dataset with 25 obs; 10th obs has like
ramu,anji,ramu,azad,ramu like this. i want to know how many
times the word repeats in that obs?

Answers were Sorted based on User's Feedback



i have a dataset with 25 obs; 10th obs has like ramu,anji,ramu,azad,ramu like this. i want to know..

Answer / alok karan

data repeat;
x="ramu anji ramu azad ramu";
y=count(x,"ramu");
run;
proc print data=repeat;
run;

Is This Answer Correct ?    2 Yes 1 No

i have a dataset with 25 obs; 10th obs has like ramu,anji,ramu,azad,ramu like this. i want to know..

Answer / aarti

Data DS;
INFILE datalines;
input name $;
datalines;
ram
sham
seema
amit
sham
sushil
amit
seema
ravi
run;
proc sql;
create table rep as
select name,count(name) as cnt from ds group by 1;
quit;
proc print data=rep;

Is This Answer Correct ?    1 Yes 2 No

i have a dataset with 25 obs; 10th obs has like ramu,anji,ramu,azad,ramu like this. i want to know..

Answer / vivek

Data DS;
INFILE datalines;
input name $;
datalines;
ram
sham
seema
amit
sham
sushil
amit
seema
ravi
run;

proc freq data = ds;
table name;
output out =dsfrq;
run;

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SAS Interview Questions

How could you generate test data with no input data?

14 Answers   CTS,


how do we mail reports from SAS environment to our team leader

5 Answers   Wockhardt,


What are the five ways to do a table lookup in sas? : sas-grid-administration

0 Answers  


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?

2 Answers  


what are the three main credit bureau names

1 Answers   Synchrony Financial,


how many types of MERGE?

17 Answers   CitiGroup,


What do you feel about hardcoding?

3 Answers   Pfizer,


how does sas handle missing values in assignment statements? : Sas programming

0 Answers  


How to convert a given date value into SAS date

9 Answers   CitiGroup, Quintiles,


why is sas considered self-documenting? : Sas programming

0 Answers  


how to import XTP files into SAS datasets?

1 Answers   Barclays, Institute For Plasma Research,


What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?

0 Answers  


Categories