PGMNAME

The PGMNAME option controls the handling of program-names and entry-point names.

Read syntax diagramSkip visual syntax diagram
PGMNAME option syntax

            .-UPPER-.     
>>-PGMNAME(-+-MIXED-+-)----------------------------------------><

Default is: PGMNAME(UPPER)

Abbreviations are: PGMN(LU|LM)

For compatibility with COBOL for OS/390® & VM, LONGMIXED and LONGUPPER are also supported.

LONGUPPER can be abbreviated as UPPER, LU, or U. LONGMIXED can be abbreviated as MIXED, LM, or M.

COMPAT: If you specify PGMNAME(COMPAT), PGMNAME(UPPER) will be set, and you will receive a warning message.

PGMNAME controls the handling of names used in the following contexts:

PGMNAME(UPPER)

With PGMNAME(UPPER), program-names that are specified in the PROGRAM-ID paragraph as COBOL user-defined words must follow the normal COBOL rules for forming a user-defined word:

  • The program-name can be up to 30 characters in length.
  • All the characters used in the name must be alphabetic, digits, the hyphen, or the underscore.
  • At least one character must be alphabetic.
  • The hyphen cannot be used as the first or last character.
  • The underscore cannot be used as the first character.

When a program-name is specified as a literal, in either a definition or a reference, then:

  • The program-name can be up to 160 characters in length.
  • All the characters used in the name must be alphabetic, digits, the hyphen, or the underscore.
  • At least one character must be alphabetic.
  • The hyphen cannot be used as the first or last character.
  • The underscore can be used in any position.

External program-names are processed with alphabetic characters folded to uppercase.

PGMNAME(MIXED)

With PGMNAME(MIXED), program-names are processed as is, without truncation, translation, or folding to uppercase.

With PGMNAME(MIXED), all program-name definitions must be specified using the literal format of the program-name in the PROGRAM-ID paragraph or ENTRY statement.