Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Handling COMMON sections

COMMONs are sections that at the time of linking do not as yet contain any data or instructions but simply reserve space for that purpose. These areas can be used after loading of the load unit as data communication areas between different modules or as reserved space for CSECTs.

COMMONs with the same name that are defined in different modules of the load unit are assigned a single shared memory area by DBL. DBL selects this area sufficiently large so that the longest COMMON section of this name can be accommodated. It is not possible to enlarge this memory area by a BIND macro call during the program run. If there is no control section (CSECT) with the same name as the COMMON section, DBL delays processing until all modules have been loaded. If a CSECT has the same name as a COMMON section, DBL assigns this CSECT the address of the COMMON section, i.e. the COMMON section is initialized with this CSECT when the load unit is loaded. Also, the attributes and contents of the COMMON section are matched to those of the CSECT during initialization.

If a CSECT has the same name as a COMMON section, DBL takes the COMMON statement into account earlier, namely when processing the relevant CSECT.

  • If the COMMON section appears in the input ahead of the identically named CSECT, DBL assigns the greater of the two lengths to the COMMON.

  • If the CSECT appears in the input ahead of the identically named COMMON section, DBL makes the COMMON the same length as the CSECT, regardless of the length specified in the COMMON definition.

The autolink function has no effect for COMMON sections. A module with a COMMON section referred to by an EXTRN or VCON is thus not automatically loaded.

If name conflicts occur, they are handled as described in "Handling name conflicts".