With 50 years of history and counting, COBOL is of course pervasive. But the number of lines of COBOL code isn’t the only big thing about COBOL. The language itself is vast and there are several dialects each with its own vocabulary and semantic behavior.
To shed some light on the sheer scale of the language, we looked into the dialects known to the Micro Focus COBOL compiler and found that there are over 20.
From mainframe dialects such as IBM’s Enterprise COBOL and Systems Application Architecture to ANSI 74, 85 and ISO2002 standards, there’s an almost dizzying array of dialects that have come about from the different standards bodies and platforms vendors.
And the number of reserved words in total? Over 1200 for all the dialects put together. Compare this to C# at less than 100 key words and about 50 for Java.
Keywords do for COBOL developers what APIs, functions, classes and methods might do for other languages. The difference is that COBOL does this using English language-like sentences and vocabulary.
To illustrate, these lines of code perform the same action:
open input invoice-file
FileStream fileStream = new FileStream(@”c:\invoice.dat”, FileMode.Open, FileAccess.Read);
To a non-COBOL developer the number of key words might seem daunting at first but in reality, this means that a developer who doesn’t know COBOL stands a fairly good chance of reading an existing application and, importantly, understanding it.
This is one of the many strengths of COBOL and contributes to its continued relevance in today’s business world. It means that a COBOL application written in any of those dialects can be found today running on Windows, Linux, Unix as native code or in JVM and .NET or in the cloud.
In terms of keywords, dialects and standards, COBOL proves that less isn’t necessarily more.
You’ll find a list of C# keywords here: http://msdn.microsoft.com/en-us/library/x53a06bb.aspx
And Java keywords here: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/_keywords.html