Hi,
What is the difference between CALL and XCTL?
What is the difference between CALL and XCTL?
- Akshya Chopra
- Registered Member
- Posts: 80
- Joined: Mon May 20, 2013 11:32 pm
Re: What is the difference between CALL and XCTL?
Hello.
Most of the places where you will see "CALL" used are in invoking a statically linked module where you expect control to return to your program. If you run the assembly with "PRINT GEN" you can see that it's basically doing this:
XCTL is used to load and pass control to an entry point in another linked module. The module will be loaded from PDS (if not already available), then control will pass to the entry point. When it returns, control will not be returned to the calling program but to what called the calling program.
CALL: https://www.ibm.com/docs/en/zos/3.1.0?t ... escription
XCTL: https://www.ibm.com/docs/en/zos/3.1.0?t ... escription
Most of the places where you will see "CALL" used are in invoking a statically linked module where you expect control to return to your program. If you run the assembly with "PRINT GEN" you can see that it's basically doing this:
Code: Select all
L R15,=V(OTHERMOD)
BALR R14,R15
CALL: https://www.ibm.com/docs/en/zos/3.1.0?t ... escription
XCTL: https://www.ibm.com/docs/en/zos/3.1.0?t ... escription
- Akshya Chopra
- Registered Member
- Posts: 80
- Joined: Mon May 20, 2013 11:32 pm
Re: What is the difference between CALL and XCTL?
Thanks zum13.
So CALL and LINK can be considered equivalent?
So CALL and LINK can be considered equivalent?
Re: What is the difference between CALL and XCTL?
CALL passes control to another CSECT which is in the current load module and hence is already in storage. It's for calling modules that you've statically linked, i.e. you've added an INCLUDE statement in the linkage editor to bind it into the current load module.
LINK will load a separate load module into storage (if a copy isn't already available) and pass control to it, but unlike XCTL, control will return to the caller once it's done its work.
LINK: https://www.ibm.com/docs/en/zos/3.1.0?t ... escription
LINK will load a separate load module into storage (if a copy isn't already available) and pass control to it, but unlike XCTL, control will return to the caller once it's done its work.
LINK: https://www.ibm.com/docs/en/zos/3.1.0?t ... escription
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: What is the difference between CALL and XCTL?
If you are talking about the difference between EXEC CICS CALL and EXEC CICS XCTL, the former acts as a subroutine call and will return to the program (the statement after the EXEC CICS CALL) when the subprogram ends whereas the latter transfers control to the new program and does not return to the program with EXEC CICS XCTL.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute