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


XATTR instruction (z/OS and CMS)

HLASM Language Reference
SC26-4940-06

The XATTR instruction enables attributes to be assigned to an external symbol. This instruction is only valid when you specify the GOFF assembler option.
Read syntax diagramSkip visual syntax diagram
                  .-,---------.   
                  V           |   
>>-symbol--XATTR----attribute-+--------------------------------><

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:
  1. If more than one value is specified for a given attribute, no diagnostic is issued and only the last value is used.
  2. All attributes of an external symbol must be specified in a single XATTR statement (which can be continued).
Read syntax diagramSkip visual syntax diagram
ATTRIBUTES

>>-ATTRIBUTES(label)-------------------------------------------><

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.

Read syntax diagramSkip visual syntax diagram
LINKAGE

>>-LINKAGE(-+-OS-----+-)---------------------------------------><
            '-XPLINK-'     

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 indicate "Extra Performance Linkage".
Read syntax diagramSkip visual syntax diagram
PSECT

>>-PSECT(name)-------------------------------------------------><

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.
Read syntax diagramSkip visual syntax diagram
REFERENCE

              .-,--------------------.     
              V                (1)   |     
>>-REFERENCE(---+-+-DIRECT---+-----+-+-)-----------------------><
                | '-INDIRECT-'     |       
                |          (1)     |       
                '-+-DATA-+---------'       
                  '-CODE-'                 

Notes:
  1. Select no more than one option from each group.
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.
Read syntax diagramSkip visual syntax diagram
SCOPE

>>-SCOPE(-+-SECTION-+-)----------------------------------------><
          +-MODULE--+     
          +-LIBRARY-+     
          +-IMPORT--+     
          '-EXPORT--'     

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).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014