The Object-Storage Section is an optional section of the Data Division that enables you to declare class object data and instance
- Data declared in the Object-Storage Section of the class object may only be accessed in class methods.
- Data declared in the Object-Storage Section of an object-program may only be accessed in instance methods.
- If DATA IS RESTRICTED or DATA IS PROTECTED is specified in the CLASS-ID paragraph, data declared in the Object-Storage Section
may be directly accessed in a subclass. Otherwise, this data may only be accessed by invoking methods.
- The syntax rules for data declared in the Object-Storage Section are the same as those for the Linkage Section except you
must not specify the DEPENDING ON phrase on an OCCURS clause when the ODOSLIDE Compiler directive is specified.
- Data declared in the Object-Storage Section can be inherited by subclasses.
- Each new instance object is allocated its own unique storage for data items declared in the Object-Storage Section.
- When the Compiler directive OOCTRL(+W) is specified, the Working-Storage Section is treated as the Object-Storage Section.