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 many types prompting framework can be broken down to? : Sas-bi

0 Answers  


How would you remove a format that has been permanently associated with a variables?

3 Answers  


name some data transformation used in sas di? : Sas-di

0 Answers  


Have you used macros? For what purpose you have used? : sas-macro

0 Answers  


diff between nodup rec and ondup key???

3 Answers   AON, Sciformix,






What are the rows present in protocol Violation table?

2 Answers   Accenture, Quintiles,


What has been your most common programming mistake?

4 Answers   Wipro,


How are the analysis data sets structured?

3 Answers  


what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi

0 Answers  


what are scrubing procedures in SAS?

1 Answers   Oracle,


What is maximum number of rows and cols can be handled in SAS?

0 Answers   Signetsoft,


Explain how you can debug and test your SAS program?

0 Answers  


Categories