X 2.3 COBOL Method Definition Structure
X A COBOL method definition describes a method. You can only specify a
X method definition within a class definition.
X With the exception of the COPY and REPLACE statements and the END METHOD
X header, the statements, entries, paragraphs, and sections of a COBOL
X method definition are grouped into the following four divisions:
- X Identification Division
- X Environment Division (Input-Output section only)
- X Data Division
- X Procedure Division
X The end of a COBOL method definition is indicated by the END METHOD
X header.
X Following is the format for the entries and statements that constitute a
X separately-compiled COBOL method definition.
X ___ Format--COBOL Method Definition ______________________________________
X | |
X | >>__ _IDENTIFICATION DIVISION._ _______________________________________> |
X | |_ID DIVISION._____________| |
| |
X | >__ _________________________________ _________________________________> |
X | |_identification-division-content_| |
| |
X | >__ ______________________________________________________________ ____> |
X | |__ENVIRONMENT DIVISION.__method-environment-division-content__| |
| |
X | >__ ________________________________________________ __________________> |
X | |__DATA DIVISION.__method-data-division-content__| |
| |
X | >__ ______________________________________________________ ____________> |
X | |_PROCEDURE DIVISION.method-procedure-division-content_| |
| |
X | >___END METHOD__method-name-1.________________________________________>< |
| |
|__________________________________________________________________________|
X END METHOD
X Specifies the end of a method definition.
X Methods defined in a class can access instance data (class Working-Storage
X Section data items) introduced in the same class but not instance data
X introduced by a parent class or metaclass. Therefore, instance data is
X always private to the class that introduces it.
X Methods introduced in class-name-1 must have unique names within the class
X definition.
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.