Program-Transformation.Org: The Program Transformation Wiki
COBOL stands for Common Business Oriented Language and is considered by many as a legacy language. It was designed by the CODASYL committee in 1957 and is the second oldest third generation language.

The idea behind COBOL is that even managers can read the code, to be able to prevent programmers from writing bad code (as in: programs that transfer interest roundoff 'errors' to their own account). COBOL stems from the age of punch cards, which is why the syntax is highly restricted.

  • columns 1-6: line number
  • column 7: line continuation or empty
  • columns 8-11: division, section and paragraph labels
  • columns 12-72: code
  • columns 73-80: comments

Commands can't be longer then 61 characters, or they must be continued using a \ character in column 72. Only capital letters can be used. Some characters in the ASCII range 0-32 are normal characters for COBOL, which presents some problems for contemporary systems, because they use these characters for control codes.

A lot of legacy code is written in COBOL. Most programs used today are in COBOL. The impossibility to port all these programs to nowadays more common (more concise and better maintainable) languages gave rise to many projects that aim at automatic improvement of COBOL programs.

Cobol documentation and grammars at:

See for a test suite for Cobol-85 processors.

Tools for transforming COBOL: