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

Which of the following is not created during compilation phase?

2 Answers   SAS,


Which function is used to count the number of intervals between two sas dates?

0 Answers  


sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately

0 Answers  


What are the scrubbing procedures in sas?

0 Answers  


WHAT DIFFERRENCE DID YOU FIND AMONG VERSION 6 8 AND 9 OF SAS.

4 Answers   Genzyme,






How to create a permanent sas data set?

0 Answers  


Are you involved in writing the inferential analysis plan? Tables specifications?

0 Answers   Oracle,


What is the difference between %put and symbolgen? : sas-macro

0 Answers  


Write SAS codes to compare two datasets. Suppose the allowable difference is 0.1.

2 Answers  


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

0 Answers  


Mention the category in which sas informats are placed?

0 Answers  


I am having a stored process.it needs to route my report to both hthml and Xls.By default SP routes to html.I used the PRINTTO to route the html to Xls.BUt it createsthe file not but no content was written to file(0KB)?how can i do it?

1 Answers  


Categories