If MENU links to MENU2, what action does CICS take when MENU2 issues a RETURN command?
-
It starts executing at the beginning of MENU
-
It starts a new task called MENU
-
It returns to the statement after the LINK command in MENU
-
It links to MENU
When CICS issues a LINK command to transfer control to another program (MENU to MENU2), it creates a nested execution level. When the linked program (MENU2) issues a RETURN, CICS returns control to the statement immediately following the LINK command in the calling program (MENU), not to the beginning of MENU.
In CICS, a LINK command transfers control to another program while remembering the point of origin, so that when the linked-to program (MENU2) issues RETURN, control passes back to the statement immediately following the original LINK call in MENU. This is different from an XCTL (transfer control), which does not return, or starting a brand-new task.