HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Classes (z/OS and CMS)

HLASM Language Reference
SC26-4940-06

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.

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_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 below 16 Mb, and CLASS_X might be loaded anywhere below 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.

Resuming a section causes 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

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014