XATTR instruction (z/OS and CMS)
The XATTR instruction enables attributes to be assigned to an external
symbol. This instruction is only valid when you specify the GOFF
assembler option.
- symbol
- Is a symbol which has been declared implicitly or explicitly as an external symbol. Further, if the PSECT attribute is specified, must be an RSECT, CSECT, or START name or an ENTRY name (where the entry is in one of the preceding types of section)
- attribute
- Is one or more attributes from the group of attributes described below. The assembler sets the appropriate attribute flags in the GOFF External Symbol Directory record.
Notes:
- If more than one value is specified for a given attribute, no diagnostic is issued and only the last value is used.
- All attributes of an external symbol must be specified in a single XATTR statement (which can be continued).
- ATTRIBUTES(label), abbreviation ATTR(label)
- Is a symbol (internal
or external) known in the declaring program. It names the location
of the extended attribute information to be associated with symbol.
Instructs the assembler to place the ESDID and offset of the label in the GOFF External Symbol Dictionary record.
- LINKAGE(OS), abbreviation LINK(OS)
- Instructs the assembler
to set the
Linkage Type
attribute to standard OS linkage. - LINKAGE(XPLINK), abbreviation LINK(XPLINK)
- Instructs the assembler to set the
Linkage Type
attribute to indicateExtra Performance Linkage
.
- PSECT (name)
- Identifies the private
read-write
section
or PSECT associated with name by its being an internal or external symbol belonging to an element in the class to which the PSECT belongs. The name is one of:- An ENTRY name, where the entry is in the same section (CSECT or RSECT) as name, but in a different class. For reentrant code, the PSECT is normally a non-shared class, so a separate CATTR statement is needed to declare that class and its attributes.
- An internal label within the PSECT.
- REFERENCE(DIRECT), abbreviation REF(DIRECT)
- Instructs the
assembler to reset (clear) the
Indirect Reference
attribute. - REFERENCE(INDIRECT), abbreviation REF(INDIRECT)
- Instructs the assembler to assign the
Indirect Reference
attribute. - REFERENCE(CODE), abbreviation REF(CODE)
- Instructs the assembler to set the Executable attribute.
- REFERENCE(DATA), abbreviation REF(DATA)
- Instructs the assembler to set the Not Executable attribute.
- SCOPE(SECTION), abbreviation SCOPE(S)
- Instructs the assembler
to set the binding scope to
Section
. - SCOPE(MODULE), abbreviation SCOPE(M)
- Instructs the assembler to set the binding scope to
Module
. - SCOPE(LIBRARY), abbreviation SCOPE(L)
- Instructs the assembler to set the binding scope to
Library
. - SCOPE(IMPORT), abbreviation SCOPE(X)
- Instructs the assembler to set the binding scope to
Export-Import
(see note following this list). - SCOPE(EXPORT), abbreviation SCOPE(X)
- Instructs the assembler to set the binding scope to
Export-Import
.
This statement indicates only that the name field symbol has the specified scope. A symbol having SCOPE(X) has IMPORT status only if declared in an EXTRN statement, and has EXPORT status only if declared explicitly in an ENTRY statement, or declared implicitly as an entry on a CSECT or RSECT statement.
The SCOPE(IMPORT) or SCOPE(EXPORT) attribute is required for using Dynamic Link Libraries under the Language Environment®. For details, refer to z/OS® Language Environment Programming Guide (SA22-7561).