CATTR instruction (z/OS and CMS)
The CATTR instruction establishes a program object
external class name, and assigns binder attributes for the class. This
instruction is valid only when you specify the
GOFF or XOBJECT assembler option.
 .-,---------.
V |
>>-class_name--CATTR----attribute-+----------------------------><
|
- class_name
- is a valid program object external class name. The class name
must follow the rules for naming external symbols,
except that:
- Class names are restricted to a maximum of 16 characters
- Class names with an underscore (_) in the second character
are reserved for IBM use; for example B_TEXT.
If you use a class name of this format, it might conflict with an
IBM-defined binder class.
- attribute
- is one or more binder attributes that are assigned to the
text in this class:
- ALIGN(n)
- Aligns the text on a 2n
boundary.
n is an integer with value 0, 1, 2, 3, 4, or 12.
If not specified, then the SECTALGN
option
value (8 is the default, corresponding to ALIGN(3)) is used
(see the section "SECTALGN" in the HLASM Programmer's Guide
for more information).
Note:
Execution time support of the desired alignment depends on its
being respected by other operating system components such as linkers
and loaders.
- EXECUTABLE
- The text can be branched to or
executed--it is instructions, not data.
- DEFLOAD
- The text is not loaded when the program object is brought into
storage, but will probably be requested, and therefore will
be partially loaded, for fast access.
- MOVABLE
- The text can be moved, and is reenterable
(that is, it is free of location-dependent data such as address
constants, and executes normally if
moved to a properly aligned boundary).
- NOLOAD
- The text for this class is not loaded when the
program object is brought into storage.
An external dummy section is an example of a class which is defined
in the source program but not loaded.
- NOTEXECUTABLE
- The text cannot be branched to or executed
(that is, it is data, not instructions).
- NOTREUS
- The text is marked not reusable.
- PART(part-name)
- Identifies or continues the part with the name part-name.
The part-name can be up to 63 characters in length.
An invalid part-name is ignored and diagnostic message
'ASMA062E Illegal operand format xxxxxx' is issued.
Binding attributes assigned to the class are also
assigned to the part. Both the class and the part are assigned to
Name Space 3 and are assigned the merge attribute.
Text within a part cannot contain an entry point. If an entry point
is found within the part it is ignored and diagnostic message
'ASMA048E Entry error - xxxxxxxx' is issued.
The following rules apply to the validation of the PART
attribute on the CATTR instruction:
- If the PART attribute has not been specified on the first CATTR
statement for the class, but is specified on subsequent CATTR statements
for the class, the attribute is ignored and diagnostic message
ASMA191W is issued.
- If the PART attribute has been specified on the first
CATTR statement for the class, but is not specified on subsequent
CATTR statements for the class,
the diagnostic message ASMA155S is issued.
- Multiple parts may be defined within a class.
- PRIORITY(nnnnn)
- The binding priority to be attached to this part. The value
must be specified as an unsigned decimal number and must lie between
0 and 231-1. An invalid priority is
ignored and diagnostic message 'ASMA062E Illegal operand format xxxxxx'
is issued.
The PRIORITY attribute may be specified on the first CATTR
instruction for the part. If the PRIORITY attribute is specified on
second and subsequent CATTR instructions for the part it is ignored
and the diagnostic message ASMA191W is issued.
The PRIORITY attribute is ignored if there is no PART
attribute on the CATTR instruction and the diagnostic message
'ASMA062E Illegal operand format xxxxxx' is issued.
- READONLY
- The text is storage-protected.
- REFR
- The text is marked refreshable.
- REMOVABLE
- The content of this class can be discarded from the
program object at bind time if the user specifies an appropriate
binder option. This could help reduce the size of the program
object.
- RENT
- The text is marked reenterable.
- REUS
- The text is marked reusable.
- RMODE(24)
- The text has a residence mode of 24.
- RMODE(31)
- The text has a residence mode of 31.
- RMODE(ANY)
- The text may be placed in any
addressable storage.
Refer to the
z/OS MVS Program Management: User's Guide and Reference, SA22-7643
for details about
the binder attributes.
Default Attributes: When
you don't specify attributes on the CATTR instruction the
defaults are:
ALIGN(3),EXECUTABLE,NOTREUS,RMODE(24)
The LOAD attribute is
the default if neither DEFLOAD nor NOLOAD are specified.
Where to Use the CATTR Instruction: Use
the CATTR instruction anywhere in a source module after
any ICTL or *PROCESS statements.
The CATTR instruction must be preceded by a START, CSECT, or RSECT
statement, otherwise the assembler issues diagnostic message
ASMA190E.
A section may contain any number of classes. Any machine language
instructions or data appearing after a CATTR instruction
are components of the element defined by the section and class
names. An element is an separately relocatable component of the
resulting program object, and is typically bound with other elements
having the same attributes.
If several CATTR instructions within a source module have the same
class name, the first occurrence establishes the class and its
attributes, and the rest indicate the continuation of the text for the
class.
If you specify attributes on subsequent CATTR instructions
having the same class name as a previous CATTR instruction, the
assembler ignores the attributes and issues diagnostic message
ASMA191W.
If you specify conflicting attributes
on the same instruction,
the assembler uses the
last one specified. In the following example, the assembler uses
RMODE(ANY):
MYCLASS CATTR RMODE(24),RMODE(ANY)
Syntax Checking Only: If
you code a CATTR instruction but don't specify the
GOFF
or XOBJECT option, the assembler checks the syntax of the
instruction statement and does not process the attributes.
[ Top of Page | Previous Page | Next Page | Contents | Index ]