1.find most occurrences of a character.
for exm: input:aaabbbbdddddyyy
output: d 5 times
how can i get that?
Answer Posted / kamlesh
you need to write dow loop ,initialize counter variable=0
and use scan opcode
when first occur of 'd' finds scan returns its position
in string , increment counter=counter+1 then you have to
use substr(yrstring:pos+1:'d')now again same process
is done and if 'd' char found increment counter by 1
this process is continue until complete yrstring is scaned.
finally total number of 'd' is accumulate in COUNTER
variable.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
how can you display specific subfile page on the screen in unequal subfile?
can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
what is kids-rpg?
What is the purpose of record level identifier?
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
how do I declare a minor?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
how do I preserve and clean the array?
What is file identifier where we can use?
How can we know running job is batch or interactive?
How many program bind in one module....
what is an online rpg?
can you debug ile rpg program using isdb?
How to write record if no field or the field are different in physical file in rpgle ?