Considerations when debugging a COBOL class
The block structure of a COBOL class created with Enterprise COBOL for z/OS® and OS/390®, Version
3 Release 1 or later, is different from the block structure of a COBOL
program. The block structure of a COBOL class has the following differences:
- The CLASS is a compile unit.
- The FACTORY paragraph is a block.
- The OBJECT paragraph is a block.
- Each method is a block.
class-name:>FACTORY:>method-name
A fully qualified block
name for a method in the OBJECT paragraph is:
class-name:>OBJECT:>method-name
When
you are at a breakpoint in a method, the currently qualified block
is the method. If you enter the LIST TITLED
command with
no parameters, z/OS Debugger lists all of the data items associated with
the method. To list all of the data items in a FACTORY or OBJECT,
do the following steps:- Enter the
QUALIFY
command to set the point of view to the FACTORY or OBJECT. - Enter the
LIST TITLED
command.
For example, to list all of the object instance data items for
a class called ACCOUNT, enter the following command:
QUALIFY BLOCK ACCOUNT:>OBJECT; LIST TITLED;