Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
Any program that is passed through the CICS translator, automatically suffixed to the PROCEDURE DIVISION statement is DFHEIBLK DFHCOMMAREA.
If a program is intended to be CALLED, then the source code will look something like this -
PROCEDURE DIVISION USING LS-PARM-REC.
In LINKAGE SECTION, you'll find -
01 LS-PARM-REC PIC X(xxxx).
After passing through the translator and compiler, you'll find -
PROCEDURE DIVISION USING DFHEIBLK DFHCOMMAREA LS-PARM-REC.
If a DFHCOMMAREA is not defined to LINKAGE, then the translator will insert a 01-Byte DFHCOMMAREA automatically. The DFHEIBLK will always be inserted by the translator. These insertions are based upon the translator options PROLOGUE and EPILOGUE being active, which is usually the case.
Regardless whether this is CICS or Batch, when program 'A' calls program 'B' and parms are passed from 'A' to 'B', the parameters are 'positional'. So, if 'A' calls 'B', using WS-YELLOW and 'B' is coded with PROCEDURE DIVISION USING LS-PURPLE, this is perfectly fine, although confusing.
If DFHEIBLK is not passed, then issue -
EXEC CICS ADDRESS EIB(ADDRESS OF DFHEIBLK) END-EXEC.