REPOSITORY paragraph

The REPOSITORY paragraph allows specification of class-names that may be used within the scope of the environment division. It also allows declaration of intrinsic function names that may be used without specifying the keyword FUNCTION.

Format: REPOSITORY paragraph

Read syntax diagramSkip visual syntax diagramREPOSITORY. CLASSclass-name-1ISexternal-class-name-1java-array-class-referenceFUNCTIONintrinsic-function-name-1ALLINTRINSIC
class-name-1
A user-defined word that identifies the class.
external-class-name-1
An alphanumeric literal containing a name that enables a COBOL program to define or access classes with class-names that are defined using Java™ rules of formation.

The name must conform to the rules of formation for a fully qualified Java class-name. If the class is part of a Java package, external-class-name-1 must specify the fully qualified name of the package, followed by a period, followed by the simple name of the Java class.

See Java Language Specification, Third Edition, by Gosling et al., for Java class-name formation rules.

java-array-class-reference
A reference that enables a COBOL program to access a class that represents an array object, where the elements of the array are themselves objects. java-array-class-reference must be an alphanumeric literal with content in the following format:

Format

Read syntax diagramSkip visual syntax diagramjobjectArray:external-class-name-2
jobjectArray
Specifies a Java object array class.
:
A required separator when external-class-name-2 is specified. The colon must not be preceded or followed by space characters.
external-class-name-2
The external class-name of the type of the elements of the array. external-class-name-2 must follow the same rules of formation as external-class-name-1.

When the repository entry specifies jobjectArray without the colon separator and external-class-name-2, the elements of the object array are of type java.lang.Object.

ALL
If ALL is specified, it is as if all supported Enterprise COBOL intrinsic function names listed in the Table 1 were specified.

If ALL is specified, you shall not specify any intrinsic function name as a user-defined word, within the scope of this REPOSITORY paragraph.

intrinsic-function-name-1
The name of a supported Enterprise COBOL intrinsic function.

If any intrinsic-function-name-1 is specified more than once in the REPOSITORY paragraph, all specifications for that name shall be identical.

The intrinsic-function-name-1 shall not be specified as a user-defined word within the scope of this REPOSITORY paragraph.

Within the scope of the containing environment division, the intrinsic-function-name-1 may be specified as a function-identifier without being preceded by the keyword FUNCTION, unless specific rules require the use of the keyword FUNCTION.

Note: Since WHEN-COMPILED is both a special register and an intrinsic function name, it may not be specified in the FUNCTION clause of the REPOSITORY paragraph.