Classes (z/OS® and CMS)
Each section's contributions to a program object are assigned to one or more classes, according to their desired binding and loading properties. Class names are assigned either by default (see Default class assignments) or explicitly. You define a class with the CATTR instruction, which must follow the initiation of an executable section. The class name is provided in the name entry of the CATTR instruction, and attributes of the class are provided by the operands of the first CATTR instruction declaring the class. (See CATTR instruction (z/OS and CMS) for further information.) The element containing subsequent machine language text or storage definitions is defined by the combination of the section and class names, as illustrated in Figure 1.
CLASS_X and
CLASS_Y: SECT_A CSECT , Define section SECT_A
CLASS_X CATTR RMODE(ANY) Define class CLASS_X
- - - Statements for CLASS_X
CLASS_Y CATTR RMODE(24) Define class CLASS_Y
- - - Statements for CLASS_Y The statements following the first
CATTR instruction are assigned to an element defined by the section name SECT_A and
the class name CLASS_X. Similarly, the statements following the second CATTR
instruction are assigned to an element defined by the section name SECT_A and the
class name CLASS_Y. CLASS_Y is loaded under 16 Mb, and
CLASS_X might be loaded anywhere under 2 Gb.Class names are rarely referenced, because the attributes of the class, such as RMODE, are much more important.
You can resume a class by providing additional CATTR statements with the class name in the name entry. No attributes of the class can be specified after the first CATTR statement declaring the class.
B_TEXT class
if there is no intervening CATTR statement defining or resuming a
different class: SECT_A CSECT , Define section SECT_A
CLASS_X CATTR RMODE(ANY) Define class CLASS_X
- - - Statements for CLASS_X
CLASS_Y CATTR RMODE(24) Define class CLASS_Y
- - - Statements for CLASS_Y
SECT_A CSECT , Resume section SECT_A
- - - Statements for class B_TEXT
CLASS_X CATTR , Resume class CLASS_X
- - - More statements for CLASS_X