ISO2002MF 

The Repository Paragraph

The Repository paragraph allows specification of program-prototypes-names, function-prototype-names, class-names, delegate-names, enum-names, interface-names and property-names that may be used within the scope of this Environment Division. It also allows declaration of intrinsic-function-names that may be used without specifying the word FUNCTION.

General Format

Note: With the exception of function-specifier, references to the following specifiers can now be made without the need to specify them in the REPOSITORY paragraph, by using the TYPE external-type-name syntax . The specifiers are listed here for backward compatibility.

*

Directives

  1. In addition to the 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.
    • REPOSITORY - Creates a repository file or requests that the program being compiled is checked against the repository file.
    • RDFPATH - specifies the location of the library for the repository files.
    • ACTUAL-PARAMS - specifies the parameters to be used in the creation of a class or interface from a parameterized class or interface
    Note: None of these directives are applicable to managed COBOL.

Syntax Rules

  1. If any class-name-1, delegate-name-1, enum-name-1, interface-name-2, function-prototype-name-2, intrinsic-function-name-1, property-name-1 or program-prototype-name-1 is specified more than once in the Repository paragraph, all the specifications for that name must be identical.
  2. Literal-1, literal-2, literal-3, literal-4, literal-5, literal-6 and literal-7 must be nonnumeric literals and must not be figurative constants.
  3. If the CLASS clause is specified, class-name-2, class-name-3, and interface-name-1 must be:
    1. Parameters of a containing class definition or interface definition; or
    2. Defined in the same Repository paragraph where class-name-1 is defined.
  4. If class-name-1 is specified in the USING phrase of the Class-ID paragraph of a class definition containing this Repository paragraph or in the USING phrase of the Interface-ID paragraph of an interface definition containing this Repository paragraph, the EXPANDS phrase must not be specified.
  5. If the INTERFACE clause is specified, class-name-4, interface-name-3 and interface-name-4 must be:
    1. Parameters of a containing class definition or interface definition; or
    2. Defined in the same repository paragraph where interface-name-2 is defined.
  6. If interface-name-2 is specified in the USING phrase of the Class-ID paragraph of a class definition containing this Repository paragraph or in the USING phrase of the Interface-ID paragraph of an interface definition containing this Repository paragraph, the EXPANDS phrase must not be specified.
  7. Either program-prototype-name-1 must be the name of a program prototype or a program definition specified previously in this compilation group or:
    1. If literal-3 is not specified, there must be information in the external repository for the program program-prototype-name-1,
    2. If literal-3 is specified, there must be information in the external repository for the program literal-3.
  8. Either function-prototype-name-1 must be the name of a function prototype or a function definition specified previously in this compilation group or:
    1. If literal-5 is not specified, there must be information in the external repository for the function function-prototype-name-1,
    2. If literal-5 is specified, there must be information in the external repository for the function literal-5.
  9. Intrinsic-function-name-1 must not be specified as a user-defined word within the scope of this Repository paragraph.
  10. If ALL is specified in the intrinsic format of the function-specifier, none of the names of the intrinsic functions can be specified as a user-defined word within the scope of the Repository paragraph.
  11. If the specified class-name-1 is the name of the class definition in which this Repository paragraph is specified, references to class-name-1 are to that class definition and this class-specifier is ignored.
  12. If the specified interface-name-2 is the name of the interface definition in which this Repository paragraph is specified, references to interface-name-2 are to that interface definition and this interface-specifier is ignored.
  13. If the specified program-prototype-name-1 is the name of the program definition in which this Repository paragraph is specified or the name of a containing program, references to program-prototype-name-1 are to the named program definition and this program-specifier is ignored.
  14. If the specified function-prototype-name-1 is the name of the function definition in which this Repository paragraph is specified, references to function-prototype-name-1 are to that function definition and this function-specifier is ignored.
  15. NET If the specified delegate-name-1 is the name of the delegate definition in which this Repository paragraph is specified, references to delegate-name-1 are to that delegate definition and this delegate-specifier is ignored.
  16. NETJVM If the specified enum-name-1 is the name of the enumeration definition in which this Repository paragraph is specified, references to enum-name-1 are to that enumeration definition and this enum-specifier is ignored.
  17. If the CLASS clause is specified:
    1. If literal-1 is specified, there must be information in the external repository for the class literal-1.
    2. If literal-1 is not specified, there must be information in the external repository for the class class-name-1.
  18. If the INTERFACE clause is specified:
    1. If literal-2 is specified, there must be information in the external repository for the interface literal-2.
    2. If literal-2 is not specified, there must be information in the external repository for the interface interface-name-2.
  19. If the PROPERTY clause is specified:
    1. If literal-4 is specified, there must be information in the external repository for the property literal-4 that is part of one of the classes or interfaces that are declared in this Repository paragraph.
    2. If literal-4 is not specified, there must be information in the external repository for the property property-name-1 that is part of one of the classes or interfaces that are declared in this Repository paragraph.
  20. NET If the DELEGATE clause is specified:
    1. If literal-6 is specified, there must be information in the external repository for the delegate definition literal-6.
    2. If literal-6 is not specified, there must be information in the external repository for the delegate definition literal-6.
  21. NETJVM If the ENUM clause is specified:
    1. If literal-7 is specified, there must be information in the external repository for the enumeration definition literal-7.
    2. If literal-7 is not specified, there must be information in the external repository for the enumeration definition literal-7.

General Rules

  1. Class-name-1 is the name of a class that may be used throughout the scope of the containing Environment Division.
  2. If the AS phrase is specified, literal-1, literal-2, literal-3, literal-5 or literal-6 is the name by which the class, interface, program, function or delegate respectively, is known to the operating environment. Literal-4 is the name known to the operating environment for a method that implements the named property. The AS phr