View previous topic :: View next topic
|
Author |
Message |
shot makerr
New User
Joined: 28 Apr 2008 Posts: 1 Location: Pune
|
|
|
|
Hi,
I don't have any exposure to CICS environment, so this question may sound silly, sorry for that. I could not get answers from anywhere, hence posting here.
We can use CALL verb in COBOL/CICS, however we dont get to see this. we only see this being handled by LINK/XCTL. why?
Is there any limit in using CALL in COBOL/CICS? like whether called module can have CICS instruction or not? whether this called module need to be registered in CIC control tables?
Can we relate STATIC and DYNAMIC with CALL,LINK and XCTL? |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
as far as I know Link and XCTL are dynamic.
you can force CALL dynamic using a working field with the name of the program to be called .
CALL w-nameofprogram USING copybook
CALL 'nameofprogram' USING copybook
in this point read for the DYNAM compiler option.
you can use CALL to invoke programs with CICS sentences...BUT take care as the DFH blocks are inserted in the Procedure division (by the CICS traductor) as: PROCEDURE DIVISION USING dfheiblk dfhcommarea and if not done properly the arguments could be misplaced...
hth |
|
Back to top |
|
|
kalukakkad
New User
Joined: 10 Mar 2005 Posts: 81
|
|
|
|
Some more points of using 'CALL' over 'LINK/XCTL'
1) 'Call' uses less number of instruction than 'LINK/XCTL', hence faster.
2) When using 'Call' in CICS, the CICS TRACE will not show any entries (drawback),whereas LINK/XCTL will have an entry. Useful in debugging.
3) LINK/XCTL requires PPT entry for the called program. But if the called program does not have any CICS instructions, there is no need for a PPT entry and you use 'CALL'. |
|
Back to top |
|
|
acevedo
Active User
Joined: 11 May 2005 Posts: 344 Location: Spain
|
|
|
|
and...... beware of using EXEC CICS RETURN in a called program when the caller has invoke it using CALL instead of LINK. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
kalukakkad wrote: |
3) LINK/XCTL requires PPT entry for the called program. But if the called program does not have any CICS instructions, there is no need for a PPT entry and you use 'CALL'. |
With autoinstall, you do not need the PPT entry, it will be created for you.
With a dynamic CALL, again, a PPT entry will be created. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Some cautionary observations -
If the Caller is defined as THREADSAFE in the PPT, the called program better be THREADSAFE as well. Otherwise, you're going to have some "opportunities".
If the Caller is accessing the Called program "STATICALLY", then then Caller needs to pass their own WS as a parameter to the Called program and allow the Called program to use the Caller's WS as its own (defined to LINKAGE). This is especially true with THREADSAFE but it can also rear its ugly head in a non-THREADSAFE run-unit.
One final note is that the CALL verb does not invoke MVS services, even though you've specified the called sub-program in a variable, but it's not DYNAMIC. CICS uses it's own method to locate the target sub-program via a PPT lookup.
COBOL/CICS programs must always specify the NODYNAM compile option.
Regards,
Bill |
|
Back to top |
|
|
|