MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CICS XCTL vs LINK, which is better

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware
View previous topic :: View next topic  
Author Message
bufbooth
Beginner


Joined: 15 Mar 2005
Posts: 8
Topics: 4

PostPosted: Fri Sep 16, 2005 3:22 pm    Post subject: CICS XCTL vs LINK, which is better Reply with quote

Hello All,

Why would one want to use LINK instead of XCTL? From what I have read, XCTL has less overhead than LINK. Also, XCTL can easily return back to the calling program by using the COMM area to pass the TransID,
thereby fully emulating the LINK command. I just do not see any reason ever to use the LINK command since it appears that the XCTL command can do everything the LINK command can do, but better. Please help me identify were I am going wrong? Thank you, Dennis...
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12372
Topics: 75
Location: San Jose

PostPosted: Fri Sep 16, 2005 3:41 pm    Post subject: Reply with quote

Quote:

From what I have read, XCTL has less overhead than LINK. Also, XCTL can easily return back to the calling program by using the COMM area to pass the TransID, thereby fully emulating the LINK command.


Can you share the source from where you read? It seems that you got it all wrong.

LINK executes a program at the next logical level from the currently executing program. Upon return from a program called by LINK, execution will resume at the next statement after the LINK call. Similar to calling a subroutine. So techincally LINK is equivalent to Call statement. A LINK or CALL statement accomplish the same thing. However, if you have a program that is repetitively used during the execution of the transaction, then a CALL could is usually more efficient than the LINK.

XCTL executes a program at the same logical level, immediately terminating the calling program(main) to run the program being called. Upon completion the control is returned to CICS.


Quote:

I just do not see any reason ever to use the LINK command since it appears that the XCTL command can do everything the LINK command can do, but better.


Not true. Read my explanation above.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
bufbooth
Beginner


Joined: 15 Mar 2005
Posts: 8
Topics: 4

PostPosted: Mon Sep 19, 2005 2:35 pm    Post subject: Reply with quote

Regarding LINK, I missed the part that control is return to the statement following the LINK command. I was thinking that control went to the top of program, which was the reason I was thinking that the two commands (LINK and XCTL) were basically the same.

Thanks,

Dennis...
Back to top
View user's profile Send private message
shashi
Beginner


Joined: 25 Apr 2005
Posts: 4
Topics: 1

PostPosted: Tue Sep 27, 2005 7:43 am    Post subject: Reply with quote

The difference betweeen LINK and XCTL: which says XCTL is less overhead

When the LINK command is executed the 'called' program is loaded into memory. Control is then transferred to the new program and it executes. The calling program, remains in memory.

but when the XCTL command is executed, the main program will be released from memory and the new program(called program) is loaded into the memory. Control is transfered to new program.

I hope this helps..


thanks
shashi
Back to top
View user's profile Send private message
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Tue Sep 27, 2005 9:56 am    Post subject: Reply with quote

Quote:

but when the XCTL command is executed, the main program will be released from memory and the new program(called program) is loaded into the memory. Control is transfered to new program.


That may not necessarily be the case. A program will be swapped out of main memory only when the RESCOUNT of that program (PPT entry) is zero i.e. no other instance of that program is running on any other terminal and the program has not been defined as RESIDENT YES. RESIDENT YES means that the program once loaded into memory will always be present in the main memory. Typically done for high use programs where the overhead of swapping the program in and out of memory becomes more than letting it permanently stay on the main memory.

Regards,
Manas
_________________
There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948)
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> CICS and Middleware All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group