Let?s consider a variable X of length 20. Move value ?ABC?
to it.How to determine how many characters does X have?



Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characte..

Answer / 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

More RPG400 Interview Questions

which MONMSG will give higher priority in CL program? I know MONMSG are of two types. Program Level Monmsg and Command Monmsg?

1 Answers  


What is Multi Occurrence Data Structure(MODS)?

1 Answers   CTS,


What is the purpose of Panel Groups?

4 Answers  


what is the use of sflnxtchg?

0 Answers   IBM,


If I have a file with 5 record and that file has 2 Key field and I want to read the unique record of the file then how can we achieve it?

1 Answers  






If there are 1000 member(PGM type) in a SRC file. How can we compile in a CL program? ( It need to be done in a loop)?

1 Answers  


3 members in databasefile .how to read records from all the members??

6 Answers   CTS,


Please help me, I have created window subfile,I have created Footer with same lengh and postion of window SFL. When I call the pgm, first is shows only Footer and then it shows subfile records.This time Footer is not showsing ..plz hel me how can i do it...? Sameple DDS and RPG: A R WIN1 SFL A*%%TS SD 20090130 165346 MUNSHIJ REL-V4R2M0 5769- PW1 A FLD001 1Y 0B 4 3EDTCDE (Z) A ATFILE R O 4 7REFFLD (QWHFDBAS/ATFILE LIB/LIBF- A ILE) A R WINCTL SFLCTL (WIN1) A*%%TS SD 20090202 123459 MUNSHIJ REL-V4R2M0 5769- PW1 A ALTNAME ('y') A SFLSIZ (0004) A SFLPAG (0004) A WINDOW (FOOTER) A ROLLUP (27) A ROLLDOWN (28) A CF12 (12 'Cancel') A 50 SFLDSP A N51 SFLDSPCTL A 51 SFLCLR A 1 2'Select Option,Press enter' A 2 3'1= Select' A R FOOTER A* A WINDOW(8 31 9 43) A 8 4'F12 = Cancel' A R DUMMY ASSUME A 24 10' ' in RPG: Dow *IN12 = *Off Write Footer Fxfmt WInCTL

2 Answers  


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

0 Answers   iGate,


I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?

2 Answers  


How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...

2 Answers  


What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?

1 Answers  


Categories