How can you determine the number of characters in a variable?

Answers were Sorted based on User's Feedback



How can you determine the number of characters in a variable?..

Answer / abhishek bajpai

Use
%Len(%Trim(Variable)) to get the exact number of characters
in a variable

Is This Answer Correct ?    14 Yes 0 No

How can you determine the number of characters in a variable?..

Answer / mahalakshmi

%CHECKR() with factor1 as blanks

Is This Answer Correct ?    0 Yes 0 No

How can you determine the number of characters in a variable?..

Answer / kcsyam

use Built-in-function %LEN()

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More RPG400 Interview Questions

can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.

0 Answers  


What would be the effect on the field where reverse image, underline and high intensity?

7 Answers   IBM,


This is my Physical file 'EMPS' existing in library "TAMIL1" and its record format is 'EMPRCD" a)its source is R EMPRCD ENO 4 0 ENAME 10 EADD 10 b)The records present in EMPS are as follows ENO ENAME EADD 0001 tamil coimbatore 0002 kumar bangalore 0003 sunder bangalore 0004 arunkumar chennai 0005 pandi hyderabad 0006 santhosh hyderabad 0007 sasi salem 0008 kalai chennai 0009 suresh hyderabad 0010 vijay bangalore 0011 Arul chennai 0012 velu chennai 0013 khan bangalore 0014 praba chennai 0015 praba.p coimbatore 0016 anand ooty 0017 raja erode 0018 sankar erode 0019 vadivel namakkal 0020 anbu chennai 0021 Ajith mumabi c)now i want to select the 'ENAME' field records starting with 'S' for that i have created a RPG program its source code is PGM DCLF FILE(TAMIL1/EMPS) DCL VAR(&MYENO) TYPE(*CHAR) LEN(4) OVRDBF FILE(EMPS) SHARE(*YES) OPNQRYF FILE((TAMIL1/EMPS)) QRYSLT('ENAME *EQ %WLDCRD("S *")') READ: RCVF RCDFMT(EMPRCD) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) CHGVAR VAR(&MYENO) VALUE(&ENO) SNDUSRMSG MSG(&MYENO) SNDUSRMSG MSG(&ENAME) SNDUSRMSG MSG(&EADD) GOTO READ END: CLOF OPNID(EMPS) DLTOVR FILE(EMPS) ENDPGM Is this coding correct sir,the program gets compiled,and if i call it it says query running but records are not displayed.please help me out

4 Answers   Virtusa,


what are the types of identifers

2 Answers   IBM,


please guys help me,I need to write a program that shows more than one way to display a subfile. Both views are of the same file but sorted differently and show different fields of the same file when the user presses a function key. send me code

4 Answers   Virtusa,






ESCAPE message sent by child program can be handled by parent program using which keyword?

2 Answers  


Can an indexed file be accessed in arrival sequence in RPG?

3 Answers  


difference between CHAIN and READE?

8 Answers   HCL,


which program rpg or cl is efficent to update a transaction onto a database file and why ?

0 Answers   IBM,


I have a PF(ABC)with no key fields. PF(ABC)have 2 fields (cusno and cusname). Please let me know how can i read the cusno = 1150 directly from PF in CL and RPG program(Without creating the LF and without reading the complete file and then compare 1150)

3 Answers   Opus,


1.How to load Records of a Physical file(PF) in the reverse order, in CL program?

2 Answers   Cap Gemini,


what is an online rpg?

0 Answers   IBM,


Categories