Top
NetCOBOL V11.0 Getting Started with COM Components
FUJITSU Software

1.4 Methods

By examining the OO COBOL program named FILEIO4 in Figure 1.2, you will note three separate Method definitions - OPEN-FILE, READ-FILE and CLOSE-FILE. These methods look almost like mini COBOL programs within the main COBOL class, and you may think of them as such. They have their own DATA DIVISIONS and LINKAGE SECTIONS and they could also have their own WORKING-STORAGE SECTIONS if needed.

Any data items defined within a method are local only to that method and cannot be referenced by other methods in the same class or by any other class or program invoking the method.