Page 1 of 1

What's the difference between a COBOL CALL and a CICS LINK?

PostPosted: Thu Aug 12, 2010 11:32 am
by Samir Mishra
Hi All,

Can someone please refer me to material which can tell me the differences between a COBOL CALL and CICS LINK? or someone can also tell me the differences right here...

Thanks & Regards,

Samir

Re: What's the difference between a COBOL CALL and a CICS LINK?

PostPosted: Thu Aug 12, 2010 12:06 pm
by Schubie
A COBOL program which CALLs an external program as a STATIC CALL creates an external reference which is resolved at LINK EDIT. The CALLed program will then become a part of the resultant load module. While a COBOL program executing under CICS may issue a DYNAMIC CALL, which is resolved during execution, there are performance implications which are likely outside the scope of a forum such as this.

A COBOL program which uses the EXEC CICS LINK 'requests' that CICS locate the LINKed program in the CICS PPT (Processing Program Table), pass control to that program and, upon the completion of the LINKed program, return. The load module which makes up the program LINKed to is not a part of the LINKing programs load module.

Information describing each can be found in

http://publib.boulder.ibm.com/infocente ... fhtm4w.htm

Re: What's the difference between a COBOL CALL and a CICS LINK?

PostPosted: Thu Aug 12, 2010 2:28 pm
by Samir Mishra
Thanks a lot Schubie...

But could you please elaborate a bit more on the performance implications aforementioned...

Also I would like to know when is it that we should 'CALL' a program and when is it that we should 'LINK' to it?

Re: What's the difference between a COBOL CALL and a CICS LINK?

PostPosted: Fri Aug 13, 2010 10:56 am
by Schubie
CICS functions as a 'mini' Operating System under the control of the System's Operating System (such as OS/390). For CICS and all the tasks which it controls to operate correctly, all requests made by CICS Transactions (Tasks) such as Program Control and Input/Output Operations should be made to CICS and not directly to the Operating System. This is to eliminate any instance of an "OS WAIT" being issued by a Transaction. If a request for service, such as a File Read/Write (GET/PUT) or, in this instance, a program LOAD, as would be a result of a DYNAMIC CALL from the COBOL program executing as a CICS Transaction. This places the entire CICS region, not simply the transaction, in a WAIT while the I/O completes. Never cause an OS WAIT to be issued by a program operating as a CICS Transaction regardless of the programming language.

I hope that is clear.

As to CALL vs LINK, if the program being CALLed is modified, it then becomes necessary to re LINKedit (PGM=HEWL) the CALLing program to include the updated CALLed sub-program code. Using EXEC CICS LINK, the LINKing program will always get the latest version of the LINKed sub-program with no need to repeat the LINKedit (PGM=HEWL). Even if the sub-program is updated while CICS is 'up', a request (CEMT) can be made that the PPT entry be 'refreshed' to point to the new LINKed program.

I hope this is also clear as the term LINK can mean two different things. I've tried to note which is the batch HEWL.

Have a great day... Oops! It's Friday the 13th. Good luck.

Re: What's the difference between a COBOL CALL and a CICS LINK?

PostPosted: Mon Aug 16, 2010 9:58 am
by Samir Mishra
Had a gr8 Friday the 13th btw... ;)

Can you please explain to me the differences between a CALL and a LINK with respect to the parameters passed during each one of them?

Re: What's the difference between a COBOL CALL and a CICS LINK?

PostPosted: Mon Aug 16, 2010 2:17 pm
by Samir Mishra
For example,

1. Are there any restrictions on the data that can be passed using CALL or in that case, LINK as well?

2. What kind of programs(batch or online) can be CALLed and what kind of programs(batch or online) are LINKed?

3. Whats the maximum length of data in any condition that can be sent using a CALL or the same for LINK? Please explain the condition as well.

:?

Re: What's the difference between a COBOL CALL and a CICS LINK?

PostPosted: Mon Aug 16, 2010 2:37 pm
by NicC

Re: What's the difference between a COBOL CALL and a CICS LINK?

PostPosted: Mon Aug 16, 2010 5:23 pm
by Samir Mishra
Thanks Nic... Will go thru these materials and get back to you... :)