Brief introduction of variables defined in Linkage Section
Linkage Section Variable Limitations
- Only 01 and 77 level variable is defined in Linkage-Section.
- All 01 and 77 level variable are allocated a pointer size space.
- Only 01 and 77 level variables are allocated
- Linkage Section variable must be initialize through:
- caller
- SET ADDRESS OF LS-VARIABLE TO somewhere
- Uninitialized Linkage Section variable is null value.
Although Linkage Section variable's definition is something like a pointer, but its usage is not that, for exampe:
To set a pointer variable:
SET POINTER-VAR TO ANOTHER-POINTER-VARIABLE SET POINTER-VAR TO ADDRESS OF NONPOINTER-VARIABLE
To set a Linkage Section variable: