Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Compiler and Runtime Migration Guide


SOM-based object-oriented COBOL language elements that are changed

This section describes the SOM-based OO COBOL language elements that have been changed in Enterprise COBOL. The following considerations apply when you migrate applications that use SOM-based OO COBOL to the Java-based OO COBOL syntax supported in Enterprise COBOL:

External names
  • External class names that are defined in the REPOSITORY paragraph must be defined with Java naming conventions for fully qualified class names, rather than the CORBA rules of formation for class names.
  • Method names that are specified as literals use Java naming conventions rather than CORBA naming conventions.
INVOKE
Instead of somNew, object instances are created with the syntax:
INVOKE classname NEW ...
METHODS
COBOL methods can override inherited methods and can be overloaded, according to Java rules. However, the OVERRIDE clause is no longer required or supported on the METHOD-ID paragraph in these cases.
OBJECTS
  • Instead of somNew, object instances are created with the syntax:
    INVOKE classname NEW ...
  • Object instances are freed through Java automatic garbage collection, rather than somFree.
  • Object instance data is initialized through VALUE clauses or user-written initialization methods, rather than with somInit.
  • OBJECT and END OBJECT syntax must be specified unless the class does not specify any object instance data or object instance methods.

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)