What would be the output of the variable result?

D RESULT S 5S O INZ(00011)
C EVAL RESULT = %TRIM(RESULT)

Please give me the correct answer for this
A.0001
b.compile time error
c.11
d.Runtime error

Answers were Sorted based on User's Feedback



What would be the output of the variable result? D RESULT S 5S O INZ(00011) C..

Answer / swetha p rao

Answer is b

compile time error as data types doesnt match

Is This Answer Correct ?    9 Yes 0 No

What would be the output of the variable result? D RESULT S 5S O INZ(00011) C..

Answer / guest

The correct amswer is-b
B'cos passed data item should be character type.

Is This Answer Correct ?    6 Yes 0 No

What would be the output of the variable result? D RESULT S 5S O INZ(00011) C..

Answer / karthik

FIRST Thing is "%TRIM" is valid only for


CHARACTER type variables...


so here your variable is DECIMAL... so while COMPILATION TIME ERROR OCCURS....

MSG: The parameter for %trim is not valid..

Is This Answer Correct ?    2 Yes 0 No

What would be the output of the variable result? D RESULT S 5S O INZ(00011) C..

Answer / d

compile time error

Is This Answer Correct ?    1 Yes 0 No

What would be the output of the variable result? D RESULT S 5S O INZ(00011) C..

Answer / anand

Answer is "b" - %Trim are used blanks at edges for the string.
And also you have to define 0(*zero) instead of 'O' as you
defined in D spec for zoned decimal.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More IBM AS400 AllOther Interview Questions

how may a cgi control duplicate inputs?

0 Answers   IBM,


Hi.can any body give me the code for this quesiton please.Because i dont have to try to enter the code in to the AS/400 server.Please can anybody give the answer for this question with complete code? A smple RPLE pgm which accepts the starting number and ending number as parameter.It then has to count all the odd numbers b/w the accepted range of numbers and display the results/ Ex:if the input parameters are 11 and 30 the result should be 10(11,13,15,17,19,21,23,25,27,29) Please explain and give me the complete code?

2 Answers   Bally Technologies,


What are the mandatory keywords of sub file?

0 Answers   IBM,


How can we create subsystem in as400?

1 Answers  


When would the ALL keyword be used?

1 Answers  






what is default data type for the fields(sub fields) defined in data structures in rpg?

2 Answers   IBM,


how do you use commitment control in rpg program ?

1 Answers   IBM,


what is the use of UNIQUEUE KEY WORD? what is the difference between PFILE AND REF?

2 Answers  


What is Folder?

1 Answers  


Can fields be concatenated INa logical file level?

1 Answers  


How to change file attributes such as size, file wait time, record wait time etc., permanently?

1 Answers  


What process the command SBMRJEJOB does?

1 Answers  


Categories