By using _________ statement, data can be sorted in a file between headers and trailers.
-
DATASORT
-
SUBSET
-
both a and b
-
None of the above
DATASORT statement is used to sort data within a file between headers and trailers in mainframe/legacy systems like Easytrieve. This statement specifically handles sorting of data records while preserving the header and trailer records. SUBSET is used for record selection/filtering, not sorting.
In IBM mainframe DFSORT/ICETOOL, the DATASORT operator is specifically designed to sort the detail (data) records in a file while keeping the leading header record(s) and trailing trailer record(s) untouched at their original positions. You specify HEADER(n) and/or TRAILER(n) to tell DATASORT how many records at the start/end to treat as headers/trailers; everything in between gets sorted per the SORT FIELDS statement, and the header/trailer records are copied through unchanged. This is distinct from ICETOOL's SUBSET operator, which extracts/removes header or trailer records rather than sorting the data between them. So 'DATASORT' is the correct keyword for 'data can be sorted in a file between headers and trailers.'