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

what is flatfile?what is the use of this file?where we can use usualy?what is the advantage of this?

2 Answers   Cognizant,


explain the purpose of keep and assume keywords?

1 Answers   IBM,


what are the different types of keys in AS400

2 Answers   HSBC,


define a output queue?

1 Answers   IBM,


is it possible, in the same cgi, to run more than one gethtml or gethtmlifs?

0 Answers   IBM,






What are the different definition levels in Data Description Specifications?

1 Answers  


How can you identify End of file in CLP program?

1 Answers  


how to define global parameter in ile ?

0 Answers   IBM,


What is difference between CAT, TCAT, BCAT?

1 Answers  


What is a job log?

1 Answers  


can I copy content of Physican file in some source Member of type TXT? Thanx..

1 Answers  


can we creat a member logical file

3 Answers  


Categories