View previous topic :: View next topic
|
Author |
Message |
rameshfoa
New User
Joined: 05 Apr 2007 Posts: 27 Location: chennai
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
The first uses CICS linkage conventions and the connection is dynamic.
The second standatd program linkage conventions and is static. |
|
Back to top |
|
|
rameshfoa
New User
Joined: 05 Apr 2007 Posts: 27 Location: chennai
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
The first uses CICS linkage conventions.
The second uses standard program linkage conventions. |
|
Back to top |
|
|
rameshfoa
New User
Joined: 05 Apr 2007 Posts: 27 Location: chennai
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
rameshfoa
New User
Joined: 05 Apr 2007 Posts: 27 Location: chennai
|
|
|
|
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 |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
rameshfoa wrote: |
Thanks william |
|
|
Back to top |
|
|
|