1.find most occurrences of a character.
for exm: input:aaabbbbdddddyyy
output: d 5 times
how can i get that?
Answer Posted / vipul dixit
With the help of %Scan built in function or Scan op-code we
can do this.
we should define a data structure and write like this way:-
DDs s
C Eval Ds = %Scan('d':Source:1).
It will fetch the position of the scanned character,and
after that we will count all the positions as DS elements.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the types of identifiers?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
When it is desirable to describe files Internally?
Hi Viewers can any body explain me how to update and ahange the already existed data in physical file using subfile ? please explain me with the code if possible?
can you debug ile rpg program using isdb?
How Chain operation copies the record's data to the input buffer for the program?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
How would display prime numbers using CL program?
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?
what is the procedure and explain about real time scenario.
how does the rpg element work?
What is ment by record level identifier?
is this a rpg channel?
what is the use of sflnxtchg?
How can we know running job is batch or interactive?