here is an example for counting vowles in apple word..
apply the same code for your required string....
01 str pic a(5) value 'apple'.
77 cnt pic 9(1) value 0.
01 i pic 9(1) value 1.
perform varying i from 1 by 1 until i>5.
if str(i:1)="A" or "a".......write all vowels.
add+1 to cnt.
first when i try to write a record into the file,
wresp=duprec, but follwed with that if i try to read the
record it say record not fnd.. actually the record is not
written in the file, but it says that duprec when trying to
write... why this happens, pls help me asap..!