Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

1.Can any body share me about thease opcodes with example please.Im new for AS/400.Could u please tell me in real senario? 1.TESTN, 2.EVAL 3.EVALR, TIME, 4.MONITOR 5. ENDMON 6.ON-ERROR 7.COMMIT ROLLBACK?

1 Answers   CSC,


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

0 Answers  


Hi,Please give me complete code with this logic. The question is how to read the records from a file with load an array of size with error condition? (The logic is Z-Add 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN9 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO)please give me complete code with explanation?

1 Answers  


What is the compilation option that has to he specified while compiling an RPC program which uses a file having date data type field?

3 Answers   HSBC, IBM,


What you have to do in the display file when you are using message subfile?

1 Answers  


How can we make use of SETLL operation in CL?

11 Answers  


I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.

2 Answers  


what is meant by record lock.how records are locked.what is the purpose of record lock.if records are locked what happens.how to find out which record is locked.

4 Answers   HCL,


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  


Whether a module can consists of many procedures or it can consist of subprocedures having a main procedure?If it is possible that it can contain many individual procedures than can we have different name for complete module and how do we call this module in main modul?

3 Answers   Steria,


What is the syntax of passing parameters to a procedure by value?

1 Answers  


In case if I want to know whether a record exists in a file, which one do you prefer CHAIN or a SETLL and why ?

1 Answers  


Categories