Multiple choice technology mainframe

How to remove the last record from the i/p file?

  1. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST = 1

  2. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST(1)

  3. SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE TRAILER

  4. All of the above

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

Both B and C are correct methods to remove the last record from an input file. Option B uses REMOVE LAST(1) which explicitly removes the last 1 record. Option C uses REMOVE TRAILER which removes trailer records - if the last record is a trailer, this achieves the same result. Both syntaxes are valid in mainframe sort utilities like Easytrieve. Option A is incorrect because REMOVE LAST = 1 has incorrect syntax (should use parentheses, not equals).