COBOL Tutorial

Progress0 of 0 lessons

COBOL AUTHOR

AUTHOR is an optional paragraph in the IDENTIFICATION DIVISION that documents who wrote the program. You write AUTHOR. followed by the programmer name or any comment. It has no effect on execution; it is for documentation only. The only required paragraph in that division is PROGRAM-ID.

Syntax

The paragraph name is AUTHOR followed by a period. The next line (or same line, depending on format) contains the author text. No strict format is required for the text.

cobol
1
2
3
4
5
IDENTIFICATION DIVISION. PROGRAM-ID. MYPROG. AUTHOR. JANE DOE. DATE-WRITTEN. 2024-01-15. *> Other optional paragraphs: INSTALLATION, DATE-COMPILED, SECURITY

Common usage

AUTHOR examples
ExampleMeaning
AUTHOR. JOHN SMITH.Documents the programmer name
AUTHOR. MAINTENANCE TEAM.Documents a team or role

Optional documentation

AUTHOR is one of several optional documentation paragraphs. INSTALLATION can name the site or system; DATE-WRITTEN and DATE-COMPILED record dates; SECURITY can note confidentiality. All are optional. Some standards or shops require AUTHOR or DATE-WRITTEN for audit or maintenance; check your local guidelines.

Explain like I'm five

AUTHOR is the “written by” line at the top of the program. It doesn’t change what the program does; it just says who wrote it so people know who to ask later.

Test Your Knowledge

1. In which division does AUTHOR appear?

  • ENVIRONMENT DIVISION
  • DATA DIVISION
  • PROCEDURE DIVISION
  • IDENTIFICATION DIVISION

2. Is AUTHOR required in a COBOL program?

  • Yes
  • No, only PROGRAM-ID is required
  • Only in main programs
  • Only for subprograms

Related Concepts

Related Pages