In CICS program i am calling some other program in this process i am making use of DFHEIBLK. But my problem is for every call DFHEIBLK this is not populating with the same values. For few calls it is populating with junk because of which my program is getting abended. Could anyone tell me what is the reason it is populating differently? and the data is same for all the cases.
The main CICS program receives the DFHEIBLK in its LINKAGE section,
which means it is a piece of storage that does not belong to the program,
but instead belongs to its caller (in that case, CICS).
You cannot initialize it !
The DFHEIBLK is populated only once (time/date can be updated on request).
You are passing the same area from program to program.
You have to make sure that the parameters passed and the one received are corresponding:
If calling program contains:
CALL 'PROG1' USING DFHEIBLK PARAMA PARAMB
Then called program ('PROG1') should contain (during the COBOL compile):
PROCEDURE DIVISION USING DFHEIBLK DFHCOMMAREA PARM2.
Can't you use Intertest (or other equivalent tool) to check the values before, during and after each call ?