Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CALL verb in COBOL/CICS programs?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
shot makerr

New User


Joined: 28 Apr 2008
Posts: 1
Location: Pune

PostPosted: Wed Apr 30, 2008 11:14 am    Post subject: CALL verb in COBOL/CICS programs?
Reply with quote

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
View user's profile Send private message

acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Wed Apr 30, 2008 12:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
kalukakkad

New User


Joined: 10 Mar 2005
Posts: 81

PostPosted: Wed Apr 30, 2008 3:10 pm    Post subject: Reply to: CALL verb in COBOL/CICS programs?
Reply with quote

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
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Wed Apr 30, 2008 3:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Wed Apr 30, 2008 8:06 pm    Post subject: Re: Reply to: CALL verb in COBOL/CICS programs?
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Apr 30, 2008 8:47 pm    Post subject: Re: CALL verb in COBOL/CICS programs?
Reply with quote

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". icon_wink.gif

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts CICS Transaction attach count of supp... lind sh CICS 1 Wed Jun 21, 2017 1:33 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us