What is the difference between the XCTL and LINK commands?


XCTL : This command passes the control to the same level.Control does not return back after this command is executed.
Syntax:
EXEC CICS XCTL
PROGRAM(PGMNAME)
COMMAREA(DATA-NAME)
END-EXEC.

LINK: link transfers the control to the next lower level.Link command also expects the control to return back.
Syntax is same use link in place of XCTL. 

Both XCTL and LINK are control transfer commands.

XCTL transfers the control to another program (called program) at the level below to the calling program. Control is never returned back to the called program.

LINK transfers the control to another program (called program) at the same of the calling program. Control is expected to return back to the called program.

No comments:

Post a Comment

Please Provide your feedback here