Redefinition of Storage



There are two ways in which memory can be redefined on Assembler.

Using a DSECT (Dummy Section)

This is illustrated by the upper text box aopposite.

Functionally this is the equivalent of the LINKAGE SECTION concept in COBOL. and BASED in PLI.

Using an ORG statement.

This is illustrated by the lower text box opposite.

Functionally this is the equivalent of REDEFINES in COBOL, and DEF in PLI.




The DSECT does not have to the same length as the area it overlays. In the instance above the DSECT is being used to assign labels to the first two of the 80 name fields. Adjusting the address in Register 4 then allows access by name to the next pair. This is akin to subscripting.




The problem with division is that the product is often a quotient and remainder. In Assembler the decimal divide instruction splits the output field into two based on the length of the divisor. The ORG statement allows processing of what has become two packed decimal fields occupying the same space as APRICE.

Copyright © Legac-e Education 2015-