SuperBOL - COBOL modernisation
#SuperTri#release#migration#MFSORT#DFSORT

SuperTri: your MFSORT and DFSORT sorts on GnuCOBOL

New in SuperBOL: SuperTri 1.0.0, a sort, merge and copy utility for GnuCOBOL that runs your MFSORT and DFSORT control cards without rewriting.

SuperTri: your MFSORT and DFSORT sorts on GnuCOBOL

A new tool is available for COBOL batch: SuperTri 1.0.0, a sort, merge and copy utility for GnuCOBOL. It runs control cards written for MFSORT (Micro Focus / Rocket) as well as those written for DFSORT (z/OS), on the files of your GnuCOBOL programs, under Linux.

If your job streams currently call mfsort from scripts, or DFSORT from your JCL steps, this article tells you what SuperTri takes as is, what it does not do yet, and how to try it on part of your batch.

Why now

Compiler and production runtime licences weigh on every server, every acceptance testing environment, every container; the sort utility is part of the bill. And your sort steps tie you to the vendor as much as your programs do: as long as your cards only run with mfsort or with DFSORT, changing platform means rewriting hundreds of steps, and revalidating each of their results.

GnuCOBOL is today a mature compiler, used in production. What was missing to move an existing batch to it was a sort utility that takes your cards without rewriting, reads and writes the same files as your programs, and produces the same outputs. That is the role of SuperTri.

SuperTri is the result of long development based on GCSORT, the GnuCOBOL community sort utility written by Sauro Menna, itself derived from OCsort, by Cédric Issaly. The community version of GCSORT continues in the GnuCOBOL contributions.

Your MFSORT jobs

SuperTri installs a command named mfsort: your scripts that call mfsort take job.srt run without modification.

  • MFSORT syntax: nested USE, GIVE, TAKE, quoted file names, dd_NAME variables, CHAR-EBCDIC, standard input and output, edit masks M0 to M26, OUTFIL reports with headers, trailers and sections.
  • The MFJSORT SYSOUT report: same listed statements, same file statistics, same messages; your operations tools that read this report keep working.
  • Micro Focus file formats: variable-length sequential files are read and written byte for byte in the Micro Focus format, to exchange data with applications not yet migrated. With GnuCOBOL 4, relative files too.
  • A strict mode: the mfsort-strict command also rejects what MFSORT rejects, to keep cards valid on both sides during the switchover.

Your DFSORT steps

For jobs coming from the mainframe, SuperTri understands the DFSORT statements most used in batch: SORT, MERGE, COPY, INCLUDE/OMIT, INREC/OUTREC with BUILD and OVERLAY, OUTFIL with FNAMES, SPLIT, SPLITBY and SAVE, SUM and XSUM, FINDREP, JOINKEYS/REFORMAT, SYMNAMES, ALTSEQ, and the E15/E35 exits written in COBOL or in C.

Common field formats are supported: CH, ZD, PD, BI, FI, FL, leading or trailing signs, UFF/SFF free-form numerics, Y2 dates, as well as collating sequences and EBCDIC signs.

What is still missing, so that you can plan: IFTHEN, PARSE, JFY and SQZ, the ICETOOL utility, and indexed files in the Micro Focus format.

One tool, four dialects

The same program knows four dialects: GCSORT (the default, with DFSORT semantics), DFSORT, MF and MF-STRICT. The dialect is chosen by the command name, by an option or by an environment variable: your jobs coming from the mainframe and those coming from Micro Focus run on the same installation.

supertri take job.srt        # GCSORT dialect (DFSORT semantics)
mfsort take job.srt          # MF dialect: replaces mfsort in your scripts
mfsort-strict take job.srt   # MF dialect, rejects what MFSORT rejects
gcsort take job.srt          # alias, for job streams already written for GCSORT

What changes in your operations

SuperTri reads and writes files with the GnuCOBOL runtime: sequential, line sequential, relative and indexed files are those of your programs. It works with GnuCOBOL 3 and GnuCOBOL 4. COBOL programs that sort with the SORT verb can hand this sort over to it, and your C programs can call its engine through a library.

In the event of an incident, SuperTri stops with a clear message and return code 16 (disk full, insufficient memory) rather than leaving a truncated file: your scheduler sees the failure. Large jobs can use several threads.

SuperTri is checked against about 600 jobs whose results were recorded with MFSORT, and against more than 1,500 automated tests.

A fully free tool

SuperTri is free software, under the GNU GPL version 3 or later licence, like GCSORT. You have the sources, you can audit them and evolve them, and you do not depend on any vendor to keep running your batch. It is part of the Build & Run family of our software, guaranteed open source.

How to try it

The approach we propose starts small:

  1. A pilot set: a few representative job streams, with their most specific sort cards and their test files.
  2. Running the cards as they are, in the dialect they come from: the list of what passes as is, and of what must be adapted.
  3. Side-by-side execution: the same input files on the old and the new job stream, and comparison of the outputs and SYSOUT reports.
  4. Roll-out in waves of applications.

SuperTri is available with the SuperBOL Subscription, which gives access to all our software and to support from the team that develops it. If you prefer to stay on the community version of GCSORT, our Pure open source support extends it for your jobs and contributes these improvements upstream.

Are you migrating a batch that calls mfsort or DFSORT? Send us a few sort cards, and we will tell you what passes as is.

SuperTri is based on GCSORT, Copyright (C) 2016-2026 Sauro Menna and 2009 Cédric Issaly (OCsort), distributed under the GNU General Public License version 3 or later; the modifications of the SuperBOL edition are Copyright (C) 2026 OCamlPro SAS. Micro Focus and Visual COBOL are trademarks of Micro Focus / Rocket Software. IBM, z/OS and DFSORT are trademarks of International Business Machines Corporation. Other names may be trademarks of their respective owners.

Read also

All news

Modernise your COBOL codebase with SuperBOL

From proof of concept to industrial-scale production deployment, get support from one of the main contributors to GnuCOBOL.

The SuperBOL logo

Download our logo in the version suited to your background.

Need another format? Contact us.