Multiple choice technology mainframe

I am using internal sort in my cobol program . Is there any way to test the return code of operation???

  1. No , we can't check the return code for internal sort however for external sort it can be done

  2. YES,by using SORT-RETURN special register

  3. YES, we can test via Run jcl.

  4. YES,by checking in listing of the proram

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

SORT-RETURN is a special register in COBOL that automatically contains the return code from SORT or MERGE operations. After an internal SORT completes, check SORT-RETURN to determine if the operation succeeded (typically 0) or failed (non-zero). External sorts also set this register, contrary to option A's claim.