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 12.
For example, suppose you define two classes, 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_YThe statements following the first CATTR instruction will be 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 will be assigned to an element defined by the section name SECT_A and the class name CLASS_Y. CLASS_Y will be loaded below 16Mb, and CLASS_X may be loaded anywhere below 2Gb.
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 may be specified after the first CATTR statement declaring the class.
Resuming a section will cause subsequent text to be placed in the 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
Each class is bound into a separately relocatable loadable segment, using one of two binding attributes.
Each class must have uniform binding and loading attributes. More than one class may have identical attributes, and the binder may put such classes into one segment. The most usual class attributes are RMODE, alignment, and Loadability; see CATTR instruction (z/OS and CMS) for further information.
Class loading attributes determine the load-time placement of segments in virtual storage. Loadable segments are loaded as separately relocated non-contiguous entities at different origin addresses.
High Level Assembler provides compatible behavior with "load module" model object files generated when the NOGOFF option is active. When the GOFF option is specified, the assembler automatically follows each CSECT, RSECT, and START statement by defining two classes: B_TEXT and B_PRV.
These two classes are bound in the same way as ordinary control sections and dummy external sections are bound in the load module model, and can be used to generate a load module if certain restrictions are satisfied.
You may declare other classes in addition to the defaults, but the resulting program object will not be convertible to a load module.
[ Top of Page | Previous Page | Next Page | Contents | Index ]