Assembler translation output

The invocation of a CICS® assembler language application program obeys system standards.

On entry to the application program, registers 1, 15, 14, and 13 contain the following addresses:
  • Register 1 contains the address of the parameter list. This list has at least two entries:
    • Address of the EIB (EXEC interface block)
    • Address of the COMMAREA; if no COMMAREA, entry is X'00000000'
  • Register 15 contains the address of the entry point.
  • Register 14 contains the address of the return point.
  • Register 13 contains the address of the save area.

All other registers are undefined.

Macro invocations

For an assembler language application program, when the CICS translator detects a CICS command, each command is replaced by an invocation of the DFHECALL macro.

DFHECALL

The DFHECALL macro sets up the command parameters and calls the initial CICS command processor to handle the command. This macro expands to a system-standard call sequence that uses registers 15, 14, 0, and 1. For details, see DFHECALL macro.

In addition to the invocation of the DFHECALL macro, the translator also inserts the following macros into your source program:
DFHEIGBL

This macro sets globals if you are using EXEC DLI in either a batch or an online CICS application program. Within DFHEIGBL, if DFHEIDL is set to 1, this means that the program contains EXEC DLI commands. If DFHEIDB is set to 1, this means that the program is batch DL/I. If you are not using DL/I, it is commented and set to 0.

DFHEIENT
This macro is inserted after the first CSECT or START instruction. It performs prolog code to allocate working storage to hold any user variables and for CICS use:
  • It saves registers
  • It gets an initial allocation of the storage that is defined by DFHEISTG
  • It sets up a base register (default register 3)
  • It sets up a dynamic storage register (default register 13)
  • It sets up a register to address the EIB (default register 11)

For AMODE(24) and AMODE(31) programs, the values provided by the DFHEIENT macro that the translator inserts automatically might be inadequate for application programs that produce a translated output greater than 4095 bytes. In this situation, you can provide your own version of the DFHEIENT macro. For more information, see Coding DFHEIENT for AMODE(24) and AMODE(31) assembler language programs.

For AMODE(64) programs, you must specify the DFHEIENT macro parameters to specify that your program uses relative addressing instructions, because only relative addressing is supported. For more information, see Coding DFHEIENT for AMODE(64) assembler language programs.

For reference information, see DFHEIENT macro.

DFHEIRET
This macro performs epilog code to release the working storage of the application program:
  • It restores registers.

    DFHEIRET RCREG=nn, where nn (any register number other than 13) contains the return code to be placed in register 15 after the registers are restored. For more information, see Coding DFHEIRET for assembler language programs.

  • It returns control to the address in register 14.

For reference information, see DFHEIRET macro.

DFHEISTG and DFHEIEND
These macros define dynamic storage:
  • They define the storage required for the parameter list.
  • They define a save area.

For more information, see Extending dynamic storage for assembler language programs.

For reference information, see DFHEISTG macro and DFHEIEND macro.

A copybook, DFHEIBLK, that contains a DSECT that describes the EIB, is also included automatically.

The program must have an END statement because the translator does not otherwise insert the default macros. Also CSECT or START and END must be in uppercase for the translator to recognize them.

The example in Figure 1 shows a simple assembler language application program that uses the BMS command SEND MAP to send a map to a terminal, followed by the output after program INSTRUCT is translated.
Figure 1. Example: Source program and translated code for a CICS command
Source program
 
INSTRUCT CSECT
         EXEC CICS SEND MAP('DFH$AGA') MAPONLY ERASE
         END
 
 
This source program is translated to:
 
         DFHEIGBL ,                INSERTED BY TRANSLATOR
INSTRUCT CSECT
         DFHEIENT                  INSERTED BY TRANSLATOR
*        EXEC CICS SEND MAP('DFH$AGA') MAPONLY ERASE
         DFHECALL =X'1804C0000800000000046204000020',
               (CHA7,=CL7'DFH$AGA*'),(______RF,DFHEIV00)
         DFHEIRET                  INSERTED BY TRANSLATOR
         DFHEISTG                  INSERTED BY TRANSLATOR
         DFHEIEND                  INSERTED BY TRANSLATOR
         END