CICS dynamic call



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: CICS dynamic call

Postby mandor » Wed Apr 25, 2012 1:40 pm

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.
mandor
 
Posts: 28
Joined: Wed Feb 23, 2011 4:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Re: CICS dynamic call

 

Re: CICS dynamic call

Postby BillyBoyo » Wed Apr 25, 2012 2:34 pm

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"?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: CICS dynamic call

Postby mandor » Wed Apr 25, 2012 6:48 pm

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)
mandor
 
Posts: 28
Joined: Wed Feb 23, 2011 4:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CICS dynamic call

Postby BillyBoyo » Wed Apr 25, 2012 7:00 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: CICS dynamic call

Postby mandor » Wed Apr 25, 2012 7:17 pm

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.
mandor
 
Posts: 28
Joined: Wed Feb 23, 2011 4:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CICS dynamic call

Postby BillyBoyo » Wed Apr 25, 2012 7:49 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: CICS dynamic call

Postby mandor » Thu Apr 26, 2012 4:37 pm

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.
mandor
 
Posts: 28
Joined: Wed Feb 23, 2011 4:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: CICS dynamic call

Postby BillyBoyo » Fri Apr 27, 2012 4:21 am

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?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Previous

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post