Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Example: defining a class

The following example shows a first attempt at the definition of the Account class, excluding method definitions.

 cbl thread,pgmname(longmixed)
 Identification Division.
 Class-id. Account inherits Base.
 Environment Division.
 Configuration section.
 Repository.
     Class Base    is “java.lang.Object”
     Class Account is “Account”.
*
 Identification division.
 Object.
  Data division.
  Working-storage section.
  01 AccountNumber  pic 9(6).
  01 AccountBalance pic S9(9) value zero.
*
  Procedure Division.
*
*   (Instance method definitions here)
*
 End Object.
*
 End class Account.

related tasks
Compiling, linking, and running OO applications
Defining a client


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)