An interface interface-1 conforms to an interface interface-2 if and only if:
- For every method in interface-2 there is a method in interface-1 with the same name taking the same number of parameters, with consistent BY REFERENCE and BY VALUE specifications.
- If the formal parameter of a given method in interface-2 is an object reference, the corresponding parameter in interface-1 is an object reference following these rules:
- If the parameter in interface-2 is a universal object reference, the corresponding parameter in interface-1 is a universal object reference.
- If the parameter in interface-2 is described with an interface-name, the corresponding parameter in interface-1 is described with the same interface- name.
- If the parameter in interface-2 is described with a class-name, the corresponding parameter in interface-1 is described with the same class-name, and the presence or absence of the FACTORY and ONLY phrases is the same in both interfaces.
- If the parameter in interface-2 is described with the ACTIVE-CLASS phrase, the corresponding parameter in interface-1 is described with the ACTIVE-CLASS phrase, and the presence or absence of the FACTORY phrase is the same in both interfaces.
- If the formal parameter of a given method in interface-2 is not an object reference, the corresponding formal parameter in interface-1 has the same ANY LENGTH, PICTURE, USAGE, SIGN, SYNCHRONIZED, JUSTIFIED, and BLANK WHEN ZERO clauses, with the following exceptions:
- Currency symbols match if and only if the corresponding currency strings are the same.
- Period picture symbols match if and only if the DECIMAL-POINT IS COMMA clause is in effect for both or for neither of these interfaces. Comma picture symbols match if and only if the DECIMAL-POINT IS COMMA clause is in effect for both or for neither of these interfaces.
- The presence or absence of the Procedure Division RETURNING phrase is the same in the corresponding methods.
- If the returning item in a given method of interface-2 is an object reference, the corresponding returning item in interface-1 is an object reference following these rules:
- If the returning item in interface-2 is a universal object reference, the corresponding returning item in interface-1 is an object reference.
- If the returning item in interface-2 is described with an interface-name that identifies the interface int-r, the corresponding returning item in interface-1 is either of the following:
- an object reference described with an interface-name that identifies int-r or an interface described with an INHERITS clause that references int-r,
- an object reference described with a class-name, subject to the following rules:
- if described with the FACTORY phrase, the factory object of the specified class must be described with an IMPLEMENTS clause that references int-r
- if described without the FACTORY phrase, the instance objects of the specified class must be described with an IMPLEMENTS clause that references int-r.
- If the returning item in interface-2 is described with a class-name, the corresponding returning item in interface-1 is an object reference, subject to the following rules:
- If the returning item in interface-2 is described with the ONLY phrase, the returning item in interface-1 is described with the ONLY phrase and the same class-name.
- If the returning item in interface-2 is described without the ONLY phrase, the returning item in interface-1 is described with the same class-name or a subclass of that class-name.
- The presence or absence of the FACTORY phrase is the same.
- If the returning item in interface-2 is described with the ACTIVE-CLASS phrase, the corresponding returning item in interface-1 is described with the ACTIVE-CLASS phrase, and the presence or absence of the FACTORY phrase is the same.
If the description of the returning item of a method in interface-1 directly or indirectly references interface-2, the description of the returning item of the corresponding method in interface-2 does not directly or indirectly reference interface-1.
- If the returning item in a given method of interface-2 is not an object reference, the corresponding returning item has the same ANY LENGTH,PICTURE, USAGE, SIGN, SYNCHRONIZED, JUSTIFIED, and BLANK WHEN ZERO clauses, with the following exceptions:
- Currency symbols match if and only if the corresponding currency strings are the same.
- Period picture symbols match if and only if the DECIMAL-POINT IS COMMA clause is in effect for both or for neither of these interfaces. Comma picture symbols match if and only if the DECIMAL-POINT IS COMMA clause is in effect for both or for neither of these interfaces.
- A group item is, for the purpose of conformance checking, considered to be equivalent to an elementary alphanumeric data item of the same length.
- The presence or absence of the OPTIONAL phrase is the same for corresponding parameters.