1.find most occurrences of a character.

for exm: input:aaabbbbdddddyyy
output: d 5 times
how can i get that?


Answer Posted / kar

Use Scan Opcode, and give the result field as array name
instead of a ordinary field.
After the execution of statement, display array values, and
you can find the all occurrences.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we override a file during runtime in rpg?

909


how do I preserve and clean the array?

839


How many program bind in one module....

2341


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?

720


how do I declare a minor?

886


can I touch the array during treatments?

935


what are the key words you must use when using a subfile?

882


What is a record lock error?

1481


how do you use commitment control in rpg?

977


what is the use of sflnxtchg?

1011


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1366


How would display prime numbers using CL program?

5936


give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........

3547


We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

1010


What is the difference between iter and do?

914