View previous topic :: View next topic |
Author |
Message |
bufbooth Beginner
Joined: 15 Mar 2005 Posts: 8 Topics: 4
|
Posted: Fri Sep 16, 2005 3:22 pm Post subject: CICS XCTL vs LINK, which is better |
|
|
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 |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Sep 16, 2005 3:41 pm Post subject: |
|
|
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 |
|
|
bufbooth Beginner
Joined: 15 Mar 2005 Posts: 8 Topics: 4
|
Posted: Mon Sep 19, 2005 2:35 pm Post subject: |
|
|
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 |
|
|
shashi Beginner
Joined: 25 Apr 2005 Posts: 4 Topics: 1
|
Posted: Tue Sep 27, 2005 7:43 am Post subject: |
|
|
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 |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Tue Sep 27, 2005 9:56 am Post subject: |
|
|
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 |
|
|
|
|