Let?s consider a variable X of length 20. Move value ?ABC?
to it.How to determine how many characters does X have?
Answer Posted / xman
Hello if You Want to Know the Characters In a Variable then
You can Use %Len With %Trim Built-in Functions
Below is the Example
D num1 S 7P 2
D chr1 S 10A inz('Toronto ')
num1 = %len(%trim(chr1));
Value of the Num1 will be 7
| Is This Answer Correct ? | 14 Yes | 0 No |
Post New Answer View All Answers
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?
what is the procedure and explain about real time scenario.
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
how do I preserve and clean the array?
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?
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?
what is the difference between do while and do until?
if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.
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...
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
what is kids-rpg?
how can you display specific subfile page on the screen in unequal subfile?
how do I declare a minor?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen