22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

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

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

Ensure that the locations of the symbols in the dummy section actually<br />

correspond to the locations of the data being described<br />

Establish the addressability of the dummy section in combination with the<br />

storage area<br />

You can then refer to the data symbolically by using the symbols defined in the<br />

dummy section.<br />

Common Control Sections<br />

A common control section is a reference control section that lets you reserve a<br />

storage area that can be used by one or more source modules. One or more<br />

common sections can be defined in a source module.<br />

The COM instruction initiates a common control section, or indicates its<br />

continuation. For more information about the COM instruction, see “COM<br />

Instruction” on page 121.<br />

How to use a common control section: A common control section (common<br />

section) lets you describe a common storage area in one or more source modules.<br />

When the separately assembled object modules are linked as one program, the<br />

required storage space is reserved for the common control section. Thus, two or<br />

more modules may share the common area.<br />

Only the storage area is provided; the assembler does not assemble the source<br />

statements that make up a common control section into object code. You must<br />

provide the data for the common area at execution time.<br />

The assembler assigns locations to the symbols you define in a common section<br />

relative to the beginning of that common section. This lets you refer symbolically to<br />

the data that is placed in the common section at execution time. If you want to<br />

refer to data in a common control section, you must establish the addressability of<br />

the common control section in each source module that contains references to it. If<br />

you code identical common sections in two or more source modules, you can<br />

communicate data symbolically between these modules through this common<br />

section.<br />

| Communicating with Modules in Other <strong>Language</strong>s: Some high-level languages<br />

| such as COBOL, PL/I, C, and FORTRAN use common control sections. This lets<br />

| you communicate between assembler language modules and modules written in<br />

| those languages.<br />

External Dummy Sections<br />

An external dummy section is a reference control section that lets you describe<br />

storage areas for one or more source modules, to be used as:<br />

Work areas for each source module<br />

Communication areas between two or more source modules<br />

| Note: External dummy sections are also called “pseudo-registers” in other contexts.<br />

When the assembled object modules are linked and loaded, you can dynamically<br />

allocate the storage required for all your external dummy sections at one time from<br />

one source module (for example, by using the MVS GETMAIN macro instruction).<br />

Chapter 3. Program Structures and Addressing 57

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

Saved successfully!

Ooh no, something went wrong!