COBOL

COBOL

COBOL

COBOL is responsible for the efficient, reliable, secure, and unseen day-to-day operations of the world's economy.

 View Only

Program-name in a literal

By Dan Zhang posted Thu April 02, 2020 12:42 PM

  

Standard COBOL 85 requires that program-name be specified as a user-defined word. IBM COBOL compilers extends the standard rule and allow program-name to be a user-defined word or alphanumeric literal, but not a figurative constant, that identifies your program. It must follow the following rules of formation, depending on the setting of the PGMNAME compiler option:

  • PGMNAME(COMPAT) If program-name is an alphanumeric literal, the rules for the name are the same except that the extension characters $, #, and @ can be included in the name of the outermost program and the underscore can be the first character.
  • PGMNAME (LONGUPPER) If program-name is an alphanumeric literal, the literal can be up to 160 characters in length. The literal cannot be a figurative constant. The underscore character can be the first character.
  • PGMNAME (LONGMIXED) The program-name must be specified as an alphanumeric literal, which can be up to 160 characters in length. The literal cannot be a figurative constant.

For more rules of program-name, see Program-ID paragraph in the Language Reference.

0 comments
4 views

Permalink