The Program-ID Paragraph

The Program-ID paragraph gives the name by which a program is identified and assigns selected program attributes to that program.

ISO2002MF The Program-ID paragraph specifies the name by which a program prototype is identified.

MF The Program-ID paragraph specifies the name by which a call prototype is identified.

General Formats
Format 1

Format 2

MFFormat 3

MF

ISO2002MFFormat 4

ISO2002MF

Directives
  1. In addition to Compiler directives which provide flagging and modify the reserved word list, the following directives may impact either the syntax or the semantics described in this section.
Syntax Rules
    All Formats
  1. OSVSVSC2MFProgram-name-1 can be a nonnumeric literal specified with or without enclosing quotation marks. The content of the literal must follow the rules for formation of program-names, but may also contain the characters @, #, and $.
  2. Program-name-1 must not be the same as another user-defined word.

    OSVSMFProgram-name-1 can be the same as another user-defined word.

  3. Formats 1 and 2
  4. OSVSVSC2The first 8 characters of program-name-1 of a program that is not contained in another program should be unique in the system. The first character must be alphabetic; otherwise it is converted as follows:

    OSVSVSC2If a hyphen is used in characters 2 through 8 of program-name-1 in a program that is not contained in another program, it is changed to zero (0).

    OSVSVSC2The MAPNAME Compiler directive controls this behavior.

    VSC2For programs that are contained in another program, program-name-1 can be any valid user-defined COBOL word, up to 30 characters long. The first eight characters need not be unique, and they will not be converted as described above. Lower-case letters are valid, but such program-names will be handled in a case-insensitive manner.

  5. ANS85A program contained within another program must not be assigned the same name as that of any other program contained within the compilation unit that contains this program.
  6. Format 2
  7. ANS85The optional COMMON clause can be used only if the program is contained within another program.
  8. ANS85If the IS PROGRAM phrase is present, at least one of COMMON or INITIAL

    ISO2002MFOS390or RECURSIVE

    must be specified.

  9. ISO2002Literal-1 must be an alphanumeric literal and must not be a figurative constant.
  10. ISO2002Literal-1 must not be specified in a program that is contained within another program.
  11. ISO2002MFThe RECURSIVE clause must not be specified if any program that directly or indirectly contains this program is an initial program.
  12. OS390The RECURSIVE clause must not be specified in a program that is contained within another program.
  13. OS390The RECURSIVE clause must not be specified in a program that contains another program.
  14. ISO2002MFFormat 4
  15. ISO2002MFProgram-prototype-name-1 identifies the program prototoype. However, literal-1, if specified, is the name of the program prototype that is externalized to the operating environment.
General Rules
    Formats 1 and 2
  1. Program-name-1 names the program declared by this program definition and is associated with the object code file pertaining to this program. Literal-1, if specified, is the name of the program that is externalized to the operating environment.
  2. Format 2
  3. ANS85 The COMMON clause specifies that the program is common. A common program is contained within another program but can be called from programs other than that containing it.
  4. ANS85 The INITIAL clause specifies that the program is initial. When an initial program is called, it and any programs contained within it are placed in their initial state. See the topic Initial State in the chapter Language Fundamentals.
  5. ISO2002MFOS390The RECURSIVE clause specifies that the program is recursive.

    ISO2002MFAny programs contained within a recursive program are recursive.

    ISO2002MFOS390A program in which the Local-Storage Section is specified is recursive.

    A recursive program may be called while it is active and may call itself.

  6. ISO2002MFOS390If the RECURSIVE clause is not specified in a program or implied for a program, the program must not be called while it is active.
  7. ISO2002MFOS390Additional rules concerning common, initial and recursive programs are given in the topic Common, Initial and Recursive Attributes in the chapter Language Fundamentals
  8. MFFormat 3
  9. MFProgram-name-1 names the call prototype that will be used during syntax checking to determine the validity and nature of CALL literal statements.