Invoking overridden superclass methods
Sometimes within a class you need to invoke an overridden superclass method instead of invoking a method that has the same signature and is defined in the current class.
For example, suppose that the CheckingAccount class overrides
debit instance method defined in its immediate
Account. You could invoke the Account
within a method in the CheckingAccount class
by coding this statement:
Invoke Super "debit" Using By Value amount.
You would define
PIC S9(9) BINARY to
match the signature of the
The CheckingAccount class overrides the
Invoke Super "print".
SUPER indicates that you want to invoke
method rather than a method in the current class. (
an implicit reference to the object used in the
invocation of the currently executing method.)
Overriding an instance method
INVOKE statement (Enterprise COBOL for z/OS® Language Reference)