How to remove the last record from the i/p file?
Reveal answer
Fill a bubble to check yourself
How to remove the last record from the i/p file?
SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST = 1
SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE LAST(1)
SUBSET FROM(IN1) TO(OUT1) INPUT REMOVE TRAILER
All of the above
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).