“SERVICE RELOAD” updates an address pointer used internally by Cobol programs for Linkage Section items. These pointers are called “BLL Cells”. This stands for “Base Locator for Linkage Section”.
As you know, 01-levels in Linkage Section are not arranged in contiguous blocks of storage, as is the case in Working Storage. Each 01-level can point to any valid starting address in memory.
So, for example, if we have two 01-levels in Linkage Section:
01 FIELD-A .
05 SUB-FIELD-1 PIC XX.
05 SUB-FIELD-2 PIC XX.
01 FIELD-B PIC X(100).
There will be one BLL cell for FIELD-A, and one for FIELD-B. They can point to very different blocks of memory.
Let’s say that you are “playing games” with the BLL cells as a way of performing a programming trick. For example, you add 2 to the BLL Cell that is used for FIELD-A. (The actual technique for doing this varies depending on the version of Cobol).
Now, if you refer to SUB-FIELD-1 e.g.:
MOVE SPACES TO SUB-FIELD-1
you will actual move spaces to SUB-FIELD-2 !
However, in the older versions of Cobol, this will only happen if you code SERVICE RELOAD FIELD-A before the MOVEstatement. SERVICE RELOAD forces Cobol to look at the value in the BLL Cell again, and use the now-current value (incremented by 2) as the base address for the 01 level. Not surprisingly, Cobol normally performs an optimization in the code, and only looks at the value in the BLL Cell once — it is not expecting us to perform this memory trick. We have to code SERVICE RELOAD to force Cobol to use the new value in the BLL Cell for calculating addresses.
As far your question of how to replace SERVICE RELOAD when it is flagged as a compile error, I would have to advise you to proceed cautiously here.
My advice is to display the value of the special register ADDRESS OF FIELD-A, both before and after the code that modifies the BLL Cell. (This code is probably in an Assembler Language subroutine.) You want to make sure that the value of ADDRESS OF FIELD-A is incremented.
This programming trick was widely used in CICS/Cobol programs, for reasons having to do with the definition of multiple duplicate lines on a BMS screen.