SOM-based OO COBOL language elements that are not supported
When you migrate COBOL applications that use SOM-based OO programming to the Java-based OO programming in Enterprise COBOL, be aware of the following SOM elements that are not supported.
- Calls to SOM
- Calls to SOM services are not supported.
- INHERITS clause
-
- Specification of more than one class name on the INHERITS clause of the CLASS-ID paragraph (multiple inheritance) is not supported.
- COBOL classes must be ultimately derived from the java.lang.Object class (rather than SOMObject or SOMClass). Specification of SOMObject as a base class in the INHERITS clause is not supported.
- Specification of SOMClass as a base class in the INHERITS clause (defining metaclasses) is not supported. Java-based OO COBOL classes can specify a FACTORY section, defining static methods that are logically part of the class-object for the class.
- INVOKE
-
- Argument lists on INVOKE statements and parameter lists for methods are restricted to data types that map to Java™ types and that are passed BY VALUE.
- Specification of a class-name that qualifies SUPER in the INVOKE
statement is not supported. For example you cannot use:
INVOKE C OF SUPER "foo"
However, the following syntax continues to be supported in Enterprise COBOL:INVOKE SUPER "foo"
- METACLASS clauses
-
- The METACLASS IS clause of the CLASS-ID paragraph is not supported.
- The METACLASS OF clause from the USAGE clause, which defines object references, is not supported.
- METHODS
-
- The OVERRIDE clause of the METHOD-ID paragraph is not supported.
- Use of methods from SOM base classes such as somNew, somFree, and somInit are not supported.