Sorting Data with DFSORT
Use DFSORT control statements to sort, merge, copy, and reformat datasets entirely at the JCL/utility level without writing a COBOL program.
DFSORT is IBM's high-performance sort/merge/copy utility, and it's one of the most heavily used pieces of batch infrastructure in any mainframe shop — because sorting, filtering, and reformatting flat files at the utility level is dramatically cheaper and simpler than writing custom COBOL to do the same thing. Interviewers ask about DFSORT constantly because 'sort a file by this key and filter out these records' is an everyday batch requirement.
DFSORT is the industrial mail-sorting machine at a postal depot — instead of a clerk manually reading and re-stacking every letter by hand (a custom program), the machine reads a barcode (the sort key), routes and reorders thousands of pieces per minute, and can even discard mail that doesn't meet criteria on the way through.