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.
A method belongs to either the FACTORY block or the OBJECT block. A fully qualified block name for a method in the FACTORY paragraph is:
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:
  1. Enter the QUALIFY command to set the point of view to the FACTORY or OBJECT.
  2. 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;