11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

XATTR instructionSCOPE(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 notefollowing 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. Asymbol having SCOPE(X) will have IMPORT status only if declared in an EXTRNstatement, and will have EXPORT status only if declared explicitly in an ENTRYstatement, or declared implicitly as an entry on a CSECT or RSECT statement.The SCOPE(IMPORT) or SCOPE(EXPORT) attribute is required for using DynamicLink Libraries under the <strong>Language</strong> Environment ® . For details, refer to z/OS<strong>Language</strong> Environment Programming Guide (SA22-7561).Association of code and data areas (z/OS and CMS)To provide support for application program reentrancy and dynamic binding, theassembler provides a way to associate read-only code and read-write data areas.This is done by defining and accessing “associated data areas” called PSECTs. APSECT (Private or Prototype Control Section) when instantiated becomes thenon-shared working storage for an invocation of a shared reentrant program.In the Program Object model, a PSECT is an element within the same section asthe element containing the shared code to which it belongs. The two classesdefining these elements will have attributes appropriate to their respective uses.Typically, V-type and R-type address constants are used to provide code anddata-area addressability for a reentrant program using PSECTs.Figure 24 on page 231 shows an example of two sections A and B, each with aPSECT. When the program object AB containing A and B is instantiated, a singlecopy of the reentrant CODE class is loaded into read-only storage, and a copy ofthe PSECT class belonging to AB is loaded into read-write storage. The invoker ofA provides the address of A’s PSECT so that A can address its own read-writedata. A later instantiation of AB would load only a new copy of the PSECT class.230 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!