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
how does the rpg element work?
How can we know running job is batch or interactive?
how do I declare a minor?
are there any useful c runtime apis that I can call from rpg iv?
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 was the robotech rpg?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
what is the use of sflnxtchg?
How to call one program from another program in RPG? please help me with the code
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?
how do I preserve and clean the array?
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
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 happens when sflsiz = sflpag? What are the advantages and disadvantages?
can you debug ile rpg program using isdb?