For an assembler-language application program, each command is replaced by an invocation of the DFHECALL macro.
The entry point held in register 15 is resolved in the EXEC interface processor (DFHEAI) that must be link-edited with your application program.
You can specify the exit from the application program by an EXEC CICS RETURN command in your source program. Alternatively, you can let the translator-inserted macro DFHEIRET, which has been inserted before the END statement, do it. This macro only restores the registers and returns control to the address in register 14. Note that this can be used to return from a top-level program but is not advisable from a lower-level program.
During assembly, the DFHECALL macro builds an argument list in dynamic storage, so that the application program is reentrant, and then invokes the EXEC interface program (DFHEIP). DFHEIP also obeys system standards, as described above.
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.
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.
A copybook, DFHEIBLK, containing a DSECT that describes the EIB, is also included automatically.
Note that the program must have an END statement because the translator does not otherwise insert the default macros.
Source program
INSTRUCT CSECT
EXEC CICS SEND MAP('DFH$AGA') MAPONLY ERASE
END
The above 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