EVALUATE WS-INPUT WHEN 1 WHEN 2 DISPLAY ‘OPTION 2’ WHEN 3 DISPLAY ‘OPTION 3’ WHEN OTHER DISPLAY ‘OTHER’ END-EVALUATE What will be displayed when WS-INPUT is 1?

  1. Nothing will be displayed

  2. OPTION 2

  3. OPTION 3

  4. OTHER


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) Nothing will be displayed - This option is incorrect because according to the given EVALUATE statement, when WS-INPUT is 1, there is a WHEN 1 clause that does not have a DISPLAY statement associated with it.

Option B) OPTION 2 - This option is correct because when WS-INPUT is 2, the EVALUATE statement matches the condition in the WHEN 2 clause and displays "OPTION 2".

Option C) OPTION 3 - This option is incorrect because when WS-INPUT is 1, the condition in the WHEN 3 clause is not met.

Option D) OTHER - This option is incorrect because when WS-INPUT is 1, the condition in the WHEN OTHER clause is not met.

The correct answer is B) OPTION 2. This option is correct because when WS-INPUT is 2, the EVALUATE statement matches the condition in the WHEN 2 clause and displays "OPTION 2".

Find more quizzes: