Joined: 14 Jan 2008 Posts: 2501 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 -
Code:
PROCEDURE DIVISION USING LS-PARM-REC.
In LINKAGE SECTION, you'll find -
Code:
01 LS-PARM-REC PIC X(xxxx).
After passing through the translator and compiler, you'll find -
Code:
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 -
Code:
EXEC CICS ADDRESS EIB(ADDRESS OF DFHEIBLK) END-EXEC.
hey Bill,
program A didn't pass dfheiblk to B, but it passed a "pic x(85) value space" field instead.
isn't it the same as that yellow-purple thing you mentioned?
thanks?
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
Hello,
If the PIC X(85) field had the contents of DFHEIBLK moved to it before the CALL, then yes, that would have worked and would have acted as a positional parameter.
But, using DFHEIBLK and DFHCOMMAREA consistently, should be the method used.