Developer for System z
COBOL for Windows, Version 7.5, Programming Guide
Developing object-oriented programs
Writing object-oriented programs
Example: accounts
Subclasses
Defining a class
CLASS-ID paragraph for defining a class
REPOSITORY paragraph for defining a class
Example: external class-names and Java packages
WORKING-STORAGE SECTION for defining class instance data
Example: defining a class
Defining a class instance method
METHOD-ID paragraph for defining a class instance method
INPUT-OUTPUT SECTION for defining a class instance method
DATA DIVISION for defining a class instance method
PROCEDURE DIVISION for defining a class instance method
Overriding an instance method
Overloading an instance method
Coding attribute (get and set) methods
Example: coding a get method
Example: defining a method
Account class
Check class
Defining a client
REPOSITORY paragraph for defining a client
DATA DIVISION for defining a client
Choosing LOCAL-STORAGE or WORKING-STORAGE
Comparing and setting object references
Invoking methods (INVOKE)
USING phrase for passing arguments
Example: passing conforming object-reference arguments from a COBOL client
RETURNING phrase for obtaining a returned value
Invoking overridden superclass methods
Creating and initializing instances of classes
Instantiating Java classes
Instantiating COBOL classes
Freeing instances of classes
Example: defining a client
Defining a subclass
CLASS-ID paragraph for defining a subclass
REPOSITORY paragraph for defining a subclass
WORKING-STORAGE SECTION for defining subclass instance data
Defining a subclass instance method
Example: defining a subclass (with methods)
CheckingAccount class (subclass of Account)
Defining a factory section
WORKING-STORAGE SECTION for defining factory data
Defining a factory method
Hiding a factory or static method
Invoking factory or static methods
Example: defining a factory (with methods)
Account class
CheckingAccount class (subclass of Account)
Check class
TestAccounts client program
Output produced by the TestAccounts client program
Wrapping procedure-oriented COBOL programs
Structuring OO applications
Examples: COBOL applications that you can run using the java command
Displaying a message
Echoing the input strings
Communicating with Java methods
Accessing JNI services
Handling Java exceptions
Example: handling Java exceptions
Managing local and global references
Deleting, saving, and freeing local references
Java access controls
Sharing data with Java
Coding interoperable data types in COBOL and Java
Declaring arrays and strings for Java
Manipulating Java arrays
Example: processing a Java int array
Manipulating Java strings
Terms of use
|
Feedback
Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)