Page 2 of 2

Re: CICS dynamic call

PostPosted: Wed Apr 25, 2012 1:40 pm
by mandor
Thanks to all!

The problem was in passed parameters. Two were missing. Now the code looks like this:
CALL B USING DFHEIBLK DFHCOMMAREA B-AREA

The same program CAN be called from BATCH and CICS, only B needs to be compiled with different settings. I don't know if this is because of my site's SCLM configuration or something else.

Re: CICS dynamic call

PostPosted: Wed Apr 25, 2012 2:34 pm
by BillyBoyo
If it is configured badly, maybe that is the answer. There seems to be no other reason to compile B as a CICS program. Then the CALL has to be different, as you noticed :-)

Funny thing is, we asked about how B was compiled and you confirmed it was without the extra items on the PROCEDURE DIVISION USING, so you managed it outside SCLM. Or did you, because if you had, we'd be back at "why doesn't that work"?

Re: CICS dynamic call

PostPosted: Wed Apr 25, 2012 6:48 pm
by mandor
I haven't tried to compile B outside SCLM jobs we have on site. The listing doesn't show that anything is added to the PROCEDURE DIVISION USING.
Are you saying that if I compiled the B program as batch it should work on CICS called with CALL B USING B-AREA?

I'm a bit confused with this:
Dynamic COBOL CALL
The CALL statement may pass DFHEIBLK and DFHCOMMAREA as the first two parameters, if the called program is to issue EXEC CICS requests, or the called program can issue EXEC CICS ADDRESS commands. The COMMAREA is optional but if other parameters are passed, a dummy COMMAREA must also be passed. If the called subprogram uses 24-bit addressing and any parameter is above the 16MB line, COBOL issues a message and abends(1033)
(http://publib.boulder.ibm.com/infocente ... fhp3p9.htm)

Re: CICS dynamic call

PostPosted: Wed Apr 25, 2012 7:00 pm
by BillyBoyo
The way I read the description is that it is not mandatory for all Dynamic Cobol CALLs to have the DFHEIBLK and DFHCOMMAREA. If they are needed, they must be present. If only the DFHEIBLK is needed, the DFHCOMMAREA doesn't have to be there, but "something" has to be there only if there are additional parameters in that case.

Are you saying that you have a CALL items on the USING, but you only have one item on the PROCEDURE DIVISION USING, which would actually be the third item on the CALL USING? I'd not expect that to work.

Re: CICS dynamic call

PostPosted: Wed Apr 25, 2012 7:17 pm
by mandor
BillyBoyo wrote:Are you saying that you have a CALL items on the USING, but you only have one item on the PROCEDURE DIVISION USING, which would actually be the third item on the CALL USING? I'd not expect that to work.


YES! That's exactly it.
prog A: CALL B USING DFHEIBLK DFHCOMMAREA B-AREA
prog B: PROCEDURE DIVISION USING B-AREA

We just bluffed with adding DFHEIBLK and DFHCOMMAREA and it worked.
I can't tell if I'm not looking at the correct compile listing - if there is something else hidden.

Re: CICS dynamic call

PostPosted: Wed Apr 25, 2012 7:49 pm
by BillyBoyo
You may get two or three listings from the compile. Try to find the final one, if there is more than one, and check there.

What you have shown will not work. The implication, from it working, is that your B has been compiled as a CICS program, even though it is not using anything CICS-related.

Perhaps talk to your CICS support people, explain what you are trying to do, and see if they can suggest something.

Re: CICS dynamic call

PostPosted: Thu Apr 26, 2012 4:37 pm
by mandor
Yes, the program is translated as CICS program although has no CICS specific code within itself.

The problem is that on this site I, the application programmer, teach the CICS people new things. :-)
The nonCICS translated program didn't work for me at all when loaded to CICS.

Re: CICS dynamic call

PostPosted: Fri Apr 27, 2012 4:21 am
by BillyBoyo
I've been googling again. There are people doing this. I've not done it myself, so no big help there. If you don't get a clear answer soon, put it on the back-burner until you are somewhere where someone knows CICS, and go with the dual compile or dummy linkage for the batch calls.

Did you XCTL successfully?