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
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 |
Answer / ambikapathy velu
CHECK opcode will returns no of repeated char in a string
| Is This Answer Correct ? | 0 Yes | 4 No |
Answer / raja
Dstring S 20A Inz ('aaabbbbdddddyyy')
Do 5
String Dsply
Enddo
eval *inlr = '1'
| Is This Answer Correct ? | 0 Yes | 6 No |
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?
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...
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?
What is the compilation option that has to he specified while compiling an RPC program which uses a file having date data type field?
What you have to do in the display file when you are using message subfile?
How can we make use of SETLL operation in CL?
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.
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.
How to find d key field of a pf that doesn’t have source physical file?
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?
What is the syntax of passing parameters to a procedure by value?
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 ?