COBOL has been standardised since 1968, but real programs are written for a compiler. Each vendor kept its own extensions and its own pace, so a program from one site often needs changes at another. This page names the standards and the main dialects, with what each added.
The standards
| Version | Year | What it added |
|---|---|---|
| COBOL-60 | 1960 | The CODASYL committee’s first specification, built largely on FLOW-MATIC and IBM’s COMTRAN: English-like statements, long hyphenated names, separate data and procedure descriptions. First programs ran on two makers’ machines in December 1960. |
| COBOL-61 | 1961 | Corrections to the 1960 report. |
| COBOL-61 Extended | 1963 | Sort and Report Writer facilities. |
| COBOL-65 | 1965 | Clarifications, mass storage files and tables. |
| COBOL-68 | 1968 | ANSI X3.23-1968, the first American standard (ISO took it up in 1972). |
| COBOL-74 | 1974 | ANSI X3.23-1974: indexed and relative files, DELETE, START, REWRITE, INSPECT (replacing EXAMINE), STRING, UNSTRING, the Report Writer and Communication modules, segmentation; NOTE dropped. |
| COBOL-85 | 1985 | ANSI X3.23-1985 and ISO 1989:1985: scope terminators (END-IF…), EVALUATE, CONTINUE, INITIALIZE, inline PERFORM, WITH TEST AFTER, nested and recursive-capable programs (COMMON, GLOBAL), reference modification, FILE STATUS, CALL ... BY CONTENT, LOCAL-STORAGE. Amendment 1 (1989, ISO 1992) added the intrinsic functions; further corrections followed in 1993. |
| COBOL 2002 | 2002 | ISO/IEC 1989:2002: object orientation (classes, methods, interfaces, INVOKE), free format, user-defined functions, recursion, exceptions and RAISE, national (Unicode) data, floating-point and binary usages, boolean and bit data, pointers, locale, VALIDATE, screens, typedefs, ALLOCATE and FREE, conditional compilation, >> directives, ROUNDED MODE, table sort, COPY ... REPLACING partial words. |
| COBOL 2014 | 2014 | ISO/IEC 1989:2014: optional modules (Report Writer, screens and VALIDATE become optional), IEEE 754 decimal and binary floating point, dynamic-capacity tables, method overloading, XML GENERATE, more intrinsic functions (CONCATENATE, SUBSTITUTE…), PICTURE SYMBOL. |
| COBOL 2023 | 2023 | ISO/IEC 1989:2023: JSON GENERATE / PARSE, LINE SEQUENTIAL organisation, COMMIT / ROLLBACK, DELETE FILE, the XOR and boolean shift operators, PERFORM UNTIL EXIT, a pausing CONTINUE, asynchronous messaging with SEND / RECEIVE, new functions. (From a summary of the standard; the standard itself is paywalled.) |
The standard is ISO/IEC 1989; in the United States it was ANSI X3.23 until the work moved to ISO. The 1985 text is available to the public through archives; the 2002 working draft and the later documents are on the standards committee sites. I could not download any of them (see the overview’s Not described section).
The main compilers
| Compiler | Platform | Notes for the source |
|---|---|---|
| IBM Enterprise COBOL for z/OS (version 6.1 and later is the 6.x line; before it 5.x, 4.x and 3.x; I could not check the current release number) | z/OS, also z/VM and VSE (older products) | The mainframe standard. Descendants of OS/VS COBOL, VS COBOL II, COBOL/370 and COBOL for OS/390. COBOL-85 plus the 2002 features IBM chose (OO, national data, XML and JSON, UTF-16, pointers, free format from 6.2), CBL/PROCESS cards, EXEC SQL and EXEC CICS through a coprocessor, COMP-1 hex float, DBCS. Source is EBCDIC in fixed-length records. |
| Micro Focus: Personal COBOL, Professional COBOL, Net Express, Server Express, Visual COBOL, Enterprise Developer | DOS, Windows, Unix, Linux, .NET, JVM, mainframe emulation | The leading non-IBM family. Directives with $SET, a large dialect set (MF, ANS85, OSVS, VSC2, IBM…), Animator (the interactive debugger, driven by its own directives), generated .int/.gnt code, Object COBOL, managed COBOL for .NET and JVM, COPY path rules, ISAM files. |
GnuCOBOL (formerly OpenCOBOL; cobc) | Windows, macOS, Linux, others | Free. Translates to C and calls the C compiler. Fixed and free format, many dialect options (-std=ibm, mf, acu, cobol85, cobol2014…), screens, Report Writer, JSON and XML generation (3.2), SQL via add-ons. No OO. Started as OpenCOBOL in the early 2000s; versions 2.2 (2017), 3.1 (2020) and 3.2 (2023). |
| ACUCOBOL-GT | Many Unix systems, Windows | Acucorp, bought by Micro Focus; runs compiled code on a virtual machine (.acu object files); its own screen and GUI words, Vision indexed files. |
| RM/COBOL | DOS, Windows, Unix | Ryan-McFarland, later Liant; compiled code runs on a runtime; its own screen handling. |
| Fujitsu NetCOBOL | Windows, Linux, mainframe-style hosts, .NET | COBOL-85 and later with OO, screens, Unicode and a GUI form designer. |
| HP NonStop (Tandem) COBOL85 | NonStop | ? directives, Enscribe files, TMF transactions, Pathway. |
| Others | Unisys, Bull, ICL, Hitachi, Siemens, Wang, DEC (VAX COBOL) | Each had its own file systems and extensions; not described here. |
Version numbers and years of vendor products above are from general knowledge and from GnuCOBOL’s documentation; I could not read the vendors’ manuals.
JCL: where COBOL sits on z/OS
A mainframe program is compiled and run by Job Control Language, not by a command line. The source lives in a data set; the JCL names the compiler and every data set it needs:
//PAYJOB JOB (ACCT),'COMPILE PAYROLL',CLASS=A,MSGCLASS=X
//COMPILE EXEC PGM=IGYCRCTL,PARM='LIB,APOST,XREF'
//STEPLIB DD DISP=SHR,DSN=IGY.SIGYCOMP
//SYSIN DD DISP=SHR,DSN=USER.COBOL.SOURCE(PAYROLL)
//SYSLIB DD DISP=SHR,DSN=USER.COPYLIB
//SYSLIN DD DSN=&&OBJ,DISP=(NEW,PASS),UNIT=SYSDA,SPACE=(TRK,(5,5))
//SYSPRINT DD SYSOUT=*
//LKED EXEC PGM=IEWL,PARM='LIST,MAP'
//SYSLIN DD DSN=&&OBJ,DISP=(OLD,DELETE)
//SYSLMOD DD DISP=SHR,DSN=USER.LOADLIB(PAYROLL)
//RUN EXEC PGM=PAYROLL
//STEPLIB DD DISP=SHR,DSN=USER.LOADLIB
//CUSTFILE DD DISP=SHR,DSN=PROD.CUSTOMER.MASTER
//SYSOUT DD SYSOUT=*
IGYCRCTLis the Enterprise COBOL compiler;PARMcarries the options that aCBLcard may hold.SYSINis the source,SYSLIBthe copybook library,SYSLINthe object output.IEWLis the linkage editor that makes a load module. The run step’sDDnames (CUSTFILE) are what the program’sSELECT ... ASSIGN TO CUSTFILErefer to.- IBM supplies cataloged procedures (
IGYWC,IGYWCL,IGYWCLG) so a job can say//COB EXEC IGYWCL. - JCL is its own language with its own file type; it appears here only because it shapes how COBOL source is organised (members, copy libraries,
DDnames).
On other platforms the equivalents are a make file, a shell script or the project of an IDE: cobc -x -o payroll payroll.cob -I copy with GnuCOBOL, cobol payroll.cbl with Micro Focus.
What breaks between dialects
- Reserved words: a new word in one compiler breaks a program that used it as a name.
- Data layout:
COMPsize and byte order, packed-decimal signs, record headers of sequential files, and the format of indexed files differ. - Reference format: columns, tabs and the end column (72 or more) differ.
- Character set: EBCDIC collating sequence and ASCII compare strings differently;
HIGH-VALUESis a different byte. - Extensions:
EXECblocks, calling conventions, screens and file-sharing differ; so do the I/O status codes above3x.