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

define the purpose of the *cat function?

1 Answers   IBM,


Can anybody please tell me what is difference between SQL (STRSQL ) and WRKQRY .....?

3 Answers  


What is purpose of declarative statement DEFN?

1 Answers  


can you display a empty subfile?

0 Answers   IBM,


when are the referential constraints executed?

0 Answers   IBM,






which are control break logic indicators?

0 Answers   IBM,


how can you check for a records existence without causing and i/o (chain/read)?

1 Answers   IBM,


what are the limitations of cl (compare to rpg) ?

1 Answers   IBM,


WHAT IS FERERENTIAL INTRIGRITY ?

0 Answers  


how do you use exceptional write in c specs?

1 Answers   IBM,


what are all the contents of subfile?

1 Answers   IBM,


define the rcvf command?

1 Answers   IBM,


Categories