Multiple choice technology mainframe

05 FIELDA PIC XXXX VALUE 'ABCb'. 05 FIELDB PIC XXXX VALUE SPACES. .... MOVE FUNCTION REVERSE(FIELDA) TO FIELDB. Which one of the following is the content of FIELDB following execution of the MOVE statement shown in the sample code above?

  1. bABC

  2. bCBA

  3. bcba

  4. ABbC

  5. ABCb

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The FUNCTION REVERSE reverses the string character by character: 'ABCb' becomes 'bCBA'. Since FIELDB is defined as PIC XXXX (4 characters), it receives the reversed value 'bCBA'.