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
 

 

What is the diff b/w calling a program using following 2 way

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

New User


Joined: 05 Apr 2007
Posts: 27
Location: chennai

PostPosted: Fri Apr 27, 2007 5:19 pm    Post subject: What is the diff b/w calling a program using following 2 way
Reply with quote

What is the diff b/w calling a program using following 2 ways in CICS program. I believe both are same.

1. EXEC CICS
LINK (pgm1)
END-EXEC

2. CALL 'pgm1'
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 27, 2007 5:28 pm    Post subject:
Reply with quote

The first uses CICS linkage conventions and the connection is dynamic.
The second standatd program linkage conventions and is static.
Back to top
View user's profile Send private message
rameshfoa

New User


Joined: 05 Apr 2007
Posts: 27
Location: chennai

PostPosted: Fri Apr 27, 2007 5:35 pm    Post subject:
Reply with quote

Ok thanks william...yes..it is known that if the program name is hard coded then it is static...and if a variable is used then it is dynamic....but is there any functional difference b/w calling a sub pgm by standard method and CICS LINK method....please explain...
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 27, 2007 5:47 pm    Post subject:
Reply with quote

The first uses CICS linkage conventions.
The second uses standard program linkage conventions.
Back to top
View user's profile Send private message
rameshfoa

New User


Joined: 05 Apr 2007
Posts: 27
Location: chennai

PostPosted: Fri Apr 27, 2007 5:50 pm    Post subject:
Reply with quote

so as a result...if both are going to work in the same way....then what is the use of calling a pgm using LINK....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 27, 2007 5:56 pm    Post subject:
Reply with quote

rameshfoa wrote:
if both are going to work in the same way
Huh?
The first does not use standard program linkage conventions.
The second does not use CICS linkage conventions.
Back to top
View user's profile Send private message
rameshfoa

New User


Joined: 05 Apr 2007
Posts: 27
Location: chennai

PostPosted: Fri Apr 27, 2007 5:56 pm    Post subject:
Reply with quote

Yes i found the reason...

Under older releases of CICS, Call statements were rarely used because called programs couldn't issue anyCICS commands. Because of that, the use of LINK commands became the norm in many COBOL shops. Even though this restriction has been lifted, many shops continue to use LINK commands. One reason for this is that you can use the LINK command to invoke a program on either a local or a remote system. A Call statement can only invoke a program on a local system.

If you don't need to invoke programs on remote systems, though, the Call statement can be more efficient than the LINK command in some situations. In particular, the Call statement is more efficient if it invokes the same program more than once within a single execution of the invoking program. If you use the LINK command, memory is allocated to the linked program and its working storage is initialized each time the
command is issued. In contrast, memory is allocated to a called program and its working storage is initialized only the first time it's called.

Thanks william icon_biggrin.gif
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Apr 27, 2007 5:58 pm    Post subject:
Reply with quote

rameshfoa wrote:
Thanks william
icon_confused.gif
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 IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm


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