Parts are the smallest externally named and independently relocatable subdivisions of elements in a merge class. A class containing parts may contain only parts, and a class containing anything other than parts may not contain any parts.
ENTRY statements may not define an entry point in a part.
You define a part with the CATTR instruction, which must follow the initiation of an executable section. The name of the class to which the part belongs is provided in the name entry of the CATTR instruction, and the name of the part is specified as an operand. The first definition of a class name may also specify the attributes of the class. (See CATTR instruction (z/OS and CMS) for further information.)
For example, suppose you define two parts in a class:
SECT_B CSECT , Define section SECT_B
PClass CATTR Part(Part_R),RMODE(ANY) Define class PClass, part Part_R
- - - Statements included in Part_R
PClass CATTR Part(Part_S) Define part Part_S in class PClass
- - - Statements included in Part_S
PClass CATTR Part(Part_R) Resume class PClass and part Part_R
- - - More statements included in Part_R
These statements define a "merge" class PClass containing two parts, Part_R and Part_S. If other classes or other object files declare parts with the same names in the same class, the binder will merge their contents to determine the final part definition in the program object.
You may provide additional statements for a part by specifying a CATTR statement with the class name in the name entry and the part name specified as the operand. No other class attributes may be specified following the first CATTR statement declaring the class.
Parts are automatically assigned a "merge" attribute, meaning that more than one identically named part may appear in a class defined in other assemblies or compilations. The binder will assign the longest length and strictest alignment of all such identically-named parts, and will merge the machine language text contributions of each to form the final text belonging to that part. The order of text merging depends on the sequence of parts processing by the binder.
Note: During linking, parts may be arranged in any order, depending on their priority attribute. Do not assume any ordering relationship among parts.
[ Top of Page | Previous Page | Next Page | Contents | Index ]