1.find most occurrences of a character.
for exm: input:aaabbbbdddddyyy
output: d 5 times
how can i get that?
Answer Posted / deepak
D:a 15a inz('aaabbbbdddddyyy')
D:b 1a
D:c 15a
D:i 2p 0
D:e 2p 0 inz(1)
C: Eval b=%sst(a:e:1)
C: eval c *cat b
C: If b='d'
C: eval replace(d:x)
C: eval i=i+1
C: eval e=e+1
C: i dsply
C: seton lr
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
what is the difference between do while and do until?
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
What are the types of identifiers?
how can you display specific subfile page on the screen in unequal subfile?
what is data area and how it is used in rpg program ?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
How Chain operation copies the record's data to the input buffer for the program?
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
What is ment by record level identifier?
What is a record lock error?
How to declare the pull button in AS/400..
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
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?
What is file identifier where we can use?
thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400