Multiple base registers

The values provided by the automatic insertion of DFHEIENT may be inadequate for application programs that produce a translated output greater than 4095 bytes.

For example, the translator by default only sets up one base register (register 3), or, when the DLI translator option has been specified, the literals produced by the translator initializing the DIB could fall outside the range of that single base register.

To overcome this problem, you can prevent the translator from automatically inserting its version of the DFHEIENT macro by specifying the translator option NOPROLOG. This enables you to provide your own DFHEIENT macro with the CODEREG operand so that you can specify more than one base register. You must code your own version of the DFHEIENT macro in place of the first CSECT or START instruction in your source program. The operands you can use to specify base registers are as follows:
For example, the source code shown in Figure 1 would become:
  INSTRUCT DFHEIENT CODEREG=(2,3,4),
           DATAREG=(13,5),
           EIBREG=6
           EXEC CICS SEND
           MAP('DFH$AGA')
           MAPONLY ERASE
           END

The symbolic register DFHEIPLR is equated to the first DATAREG either explicitly specified or obtained by default. It is recommended that, because register 13 points to the save area defined in dynamic storage by DFHEISTG, you use register 13 as the first dynamic-storage register.

DFHEIPLR is assumed by the expansion of a CICS command to contain the value set up by DFHEIENT. You should either dedicate this register or ensure that it is restored before each CICS command.

You can also use the DFHEIENT macro to specify that you want to use relative addressing instructions in your program. When you use relative addressing, you do not need to use any base registers to address your program instructions, but you do need to use at least one base register to address static data within your program, You should specify the following operands on the DFHEIENT macro:
If you use relative addressing you should also include a COPY statement for one of the copybooks DFHKEBRC (provided by CICS) or IEABRC (provided by z/OS) to redefine the assembler mnemonics for branch instructions to use relative branch instructions. You should also ensure that any LTORG statements, and instructions that are the target of EXECUTE instructions, appear after the label specified in the STATIC operand. For example:
         COPY  DFHKEBRC               Define relative branch mnemonics
RELATIVE DFHEIENT CODEREG=0,STATREG=(8,9),STATIC=MYSTATIC
         ....
         EX    R2,VARMOVE             Execute instruction in static area
         ....

MYSTATIC DS    0D                     Static data area
MYCONST  DC    C'constant'            Static data value
VARMOVE  MVC   WORKA(0),WORKB         Executed instruction
         LTORG ,                      Literal pool

Assembler-language programs, translated with the DLI option, have a DLI initialization call inserted after each CSECT statement. Assembler-language programs larger than 4095 bytes, that do not use the CODEREG operand of the DFHEIENT macro to establish multiple base registers, must include an LTORG statement to ensure that the literals, generated by either DFHEIENT or a DLI initialization call, fall within the range of the base register.

Note that, in general, an LTORG statement is needed for every CSECT that exceeds 4095 bytes in length.