Same Input, Same Output: Proving a Migrated Sort Is Faithful
What identical output really means when a sort moves off the mainframe: equal keys, EQUALS and NOEQUALS, record counts, return codes, and a test regime that proves it.
By Bill Ahlbrandt, President and CEO, Ahlbrandt Software · September 2026
When a batch workload moves from z/OS to Linux, Windows or the cloud, everybody expects its sort steps to produce the same output they always did. This paper looks at what “the same” has to mean for a sort. The records and their order are only the start. Record counts, record lengths, header and trailer records, printed reports, return codes and the messages your operations tooling reads all count too. Records with equal keys are the most common reason two correct sorts disagree, and if the original runs without order preservation there may be no single right answer to compare against. After that I lay out a test regime: production captures, byte-level hashing, record-count reconciliation, full comparison with no sampling, and a stretch of parallel running. The last section puts the cost of getting this wrong next to some documented failures in UK banking.