1.find most occurrences of a character.

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


Answers were Sorted based on User's Feedback



1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times h..

Answer / hummn

It can easily be done by using the BIF %ELEM.

Is This Answer Correct ?    0 Yes 2 No

1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times h..

Answer / shravan

dds s 15a
inz('aaabbbbdddddyyy')
dds1 s 10a

C 5 subst ds:8 ds1

C dsply ds1

c seton
lr

Is This Answer Correct ?    1 Yes 5 No

1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times h..

Answer / ambikapathy velu

CHECK opcode will returns no of repeated char in a string

Is This Answer Correct ?    0 Yes 4 No

1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times h..

Answer / raja

Dstring S 20A Inz ('aaabbbbdddddyyy')


Do 5

String Dsply

Enddo
eval *inlr = '1'

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More RPG400 Interview Questions

How can we change element of compile time array?Can we do so

1 Answers   TCS,


Can you copy the records created by the OPNQRYF to other files and how?

2 Answers  


can anybody help me that what is the procedure of debugging the service program?

3 Answers   CSC,


What is significance of a file designated as a Primary file in Rpg400 program....also what's use of secoundry file

1 Answers  


Hello, I want to extend a length of field in my Display file(Subfile). Please suggest the possible steps. Thanks

3 Answers  


In RPG program one file using as a PRIMARY file while running program some of the records reading twice any body know why its happening

2 Answers  


IN RLU what are the record level keyword is used?

5 Answers   iGate, TCS,


What is Multi Occurrence Data Structure(MODS)?

1 Answers   CTS,


If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

0 Answers  


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

0 Answers   IBM,


What is the length of Signature?

3 Answers   UST,


How to index LF by relative record no (RRN)

1 Answers  


Categories