-
Notifications
You must be signed in to change notification settings - Fork 28
Cobol Coding Styles
Home -> Development Guide ->
One of the strengths of the IBM zSeries family of computers and the z/OS operating system is backward compatibility. However, a downside to backward compatibility is that organizations have not usually kept their Cobol code up to date as the language has evolved over the years. As a result, we find every style of Cobol source code that has ever existed still in production in most large organizations.
In addition, mainframes are used in very large organizations, both public and private, in which privacy and security are high priorities. The working environment of mainframe programmers has been "closed" as opposed to the "open" world of the Internet and Open Source. A result of that is different coding conventions and norms were developed in different organizations.
Any tool intended for general use with existing Cobol source programs has to be able to handle any and all possible Cobol coding conventions. It is not acceptable for us to require the user to change their source code to accommodate any particular coding style. This means cobol-check has to work with variations in case and handle programs that have a period at the end of each sentence as well as those that have a period only at the end of each paragraph or only at the end of the Procedure Division. Yet another difference is the use of Copy statements in the Procedure Division. In some organizations, this is considered a bad practice, while in others it is considered normal and a practical way to achieve source-level code re-use.
Cobol-check cannot have an "opinion" about any of these differences in coding style. It cannot overlook any tokens when parsing a source program because of such differences in style.