Periods in COBOL

In some circles the period is considered archaic. Now that COBOL supports scope delimiters such as END-IF, END-PERFORM, and END-READ, the PROCEDURE DIVISION doesn't need any periods except at the end of each paragraph (and of course at the end of a paragraph or section label).

In this style, one typically puts the closing period on a separate line by itself, or possibly with the CONTINUE verb. This way one needn't worry about the period when rearranging the real verbs.

Rationale

The main argument for this point of view seems to be that periods are a source of bugs. All you have to do is leave one out, or put one where it doesn't belong, and your program is broken.

Yes, it happens. However, it is not obvious that the new scope delimiters are less subject to the same kind of abuse. You probably won't type END-IF by accident, but you could certainly omit it or misplace it by accident.

It is obvious that END-IF and its kindred take up more space than periods, and are more trouble to type.

(See the comments by Lee Beaulieu.)

My Own Policy

I myself have seldom suffered from missing or misplaced periods. I won't say it hasn't happened, but my mistakes usually take other forms. Perhaps years of experience have taught me to be wary.

Largely for that reason, I generally follow the traditional usage of periods. I use END-IF and the like when they come in handy, but I have launched no crusade to banish unfashionable punctuation.

This policy is also based on history. Much of my application dates from the early Cretaceous era, before END-IF, etc. were available. You might say that it is a period piece.

Recommendation

If you find yourself suffering from misuse of periods, by all means consider a no-period policy. Besides, if you're my age, not using periods will make you feel younger. Sort of like wearing a toupee.

If, like me, you find yourself more likely to abuse END-IF, then use periods in the traditional way.

Whichever way you jump, be consistent. Mixing a no-period style with occasional unnecessary periods invites confusion and heartache.

Above all, don't make a religious issue of it. It really isn't that important.


[home]COBOL Home [style forum]COBOL Style Forum