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



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

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

Postby Samir Mishra » Thu Aug 12, 2010 11:32 am

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
Samir Mishra
 
Posts: 13
Joined: Fri Jul 30, 2010 1:37 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby Schubie » Thu Aug 12, 2010 12:06 pm

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
If a bug is located in a program product which simply cannot be fixed, it becomes a 'feature'. (IBM)
User avatar
Schubie
 
Posts: 10
Joined: Wed Jul 21, 2010 9:16 am
Location: Blue Ridge, GA USA
Has thanked: 0 time
Been thanked: 0 time

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

Postby Samir Mishra » Thu Aug 12, 2010 2:28 pm

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?
Samir Mishra
 
Posts: 13
Joined: Fri Jul 30, 2010 1:37 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Schubie » Fri Aug 13, 2010 10:56 am

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.
If a bug is located in a program product which simply cannot be fixed, it becomes a 'feature'. (IBM)
User avatar
Schubie
 
Posts: 10
Joined: Wed Jul 21, 2010 9:16 am
Location: Blue Ridge, GA USA
Has thanked: 0 time
Been thanked: 0 time

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

Postby Samir Mishra » Mon Aug 16, 2010 9:58 am

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?
Samir Mishra
 
Posts: 13
Joined: Fri Jul 30, 2010 1:37 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby Samir Mishra » Mon Aug 16, 2010 2:17 pm

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.

:?
Samir Mishra
 
Posts: 13
Joined: Fri Jul 30, 2010 1:37 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Mon Aug 16, 2010 2:37 pm

The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

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

Postby Samir Mishra » Mon Aug 16, 2010 5:23 pm

Thanks Nic... Will go thru these materials and get back to you... :)
Samir Mishra
 
Posts: 13
Joined: Fri Jul 30, 2010 1:37 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post