METHOD-ID. displayOnSysout.If you are overriding a method defined in some parent class, add an OVERRIDE clause:
METHOD-ID. somInit OVERRIDE.
The LOCAL-STORAGE SECTION is the same as in an ordinary program, except that the GLOBAL attribute has no effect, since you can't have nested programs in a method definition.
This section has no counterpart in VS COBOL II. It declares variables which exist only while the method is executing. They are created when you enter the method, and are destroyed when you exit. They are similar to "auto" variables in C or C++.
The WORKING-STORAGE SECTION works in the usual way, except that GLOBAL has no effect. Items in WORKING-STORAGE occur once per class, not once per instance. Their values persist from one invocation to the next. They are accessible only to the methods which declare them, unless they are EXTERNAL.
The LINKAGE SECTION also works in the usual way, except that GLOBAL has no effect.
END METHOD displayOnSysout.