Difficulty: Medium
Correct Answer: EXEC LINK calls another CICS program and expects control to return, EXEC XCTL transfers control permanently without return, and a COBOL II static CALL invokes a non CICS subprogram that is linked in and not defined to CICS
Explanation:
Introduction / Context:
CICS applications are often modular and rely on several different mechanisms to pass control between programs. In a CICS COBOL system, EXEC LINK, EXEC XCTL, and COBOL II static CALL each serve different purposes and have different lifecycle and definition requirements. Understanding these differences is essential for designing modular, maintainable online transactions.
Given Data / Assumptions:
Concept / Approach:
EXEC LINK is a CICS command that invokes another program defined to CICS and expects control to return when the linked program completes, similar to a subroutine call in structured programming. EXEC XCTL is also a CICS command, but it transfers control to another CICS program without expecting a return, effectively replacing the current program. A COBOL II static CALL, by contrast, calls a subprogram that is statically linked into the same load module, not necessarily defined to CICS, and it is resolved at link edit time rather than at CICS program control level.
Step-by-Step Solution:
Step 1: Associate EXEC LINK with a call that returns control to the caller, with both programs defined to CICS.
Step 2: Associate EXEC XCTL with a one way transfer of control that does not return to the original program.
Step 3: Note that COBOL II static CALL invokes a subprogram that is part of the same load module and is resolved by the linker, not by CICS program control tables.
Step 4: Select the option that correctly summarizes all three behaviors together.
Verification / Alternative check:
In CICS documentation, examples of EXEC LINK show a caller regaining control after the linked program issues a RETURN. EXEC XCTL examples show permanent transfer, with no RETURN to the original program. COBOL II documentation shows that static CALL subprograms are link edited into the main program and are not necessarily registered in program processing tables. These independent descriptions align with the combined statement given in the correct option.
Why Other Options Are Wrong:
Option B incorrectly claims that LINK, XCTL, and static CALL behave identically and always return, which is not true. Option C reverses the meanings of LINK and XCTL and wrongly states that static CALL cannot be used in CICS, which is misleading. Option D assigns artificial roles related only to I O and arithmetic, which do not reflect actual usage. Option E is wrong because LINK and XCTL are CICS commands inside programs, not JCL or console commands.
Common Pitfalls:
A common mistake is using EXEC XCTL where a return is required, which can end a program prematurely and break conversational logic. Another pitfall is overusing LINK instead of static CALL for pure computational subroutines that do not need separate CICS definitions, which can increase overhead. Developers also sometimes forget that static CALL subprograms must be included in the same load module, which can lead to unresolved references. Understanding the distinct roles of EXEC LINK, EXEC XCTL, and static CALL helps you design clean, modular CICS applications.
Final Answer:
EXEC LINK calls another CICS program and expects control to return, EXEC XCTL transfers control permanently without return, and a COBOL II static CALL invokes a non CICS subprogram that is linked in and not defined to CICS
Discussion & Comments