XCTL - IBM Mainframe

XCTL transfers program control from one application to another at the same logical level. The program that transfers control to another is released. When the program that is for receive control is not resident in main storage, then it is loaded by CICS. Given below is the syntax of the XCTL command:

syntax of the XCTL command

Given below is an example of XCTL:

example of XCTL

example of XCTL

example of XCTLThe common exceptional conditions common to both LINK and XCTL are LENGERR, NOTAUTH, and PGMIDERR. LENGERR occurs if the LENGTH option value is greater than the COMMAREA option data area length or while data was being copied a destructive overlap occurred because of incorrect length. NOTAUTH occurs when the resource security check fails on the program name and PGMIDERR occurs when the program is not specified in the PPT. in all the three cases the default action is the abnormal termination of the task.

Instead of developing one big program, it is good practice to develop several functional modules. This approach will increase the maintainability of the system. The LINK and XCTL commands can be used to achieve this. But in the case of COBOL programs whatever that can be achieved by LINK and XCTL can be achieved by using a CALL statement. But if a CALL statement is used in the main program then the called program will be link edited into the load module of each main program, which uses the subprogram. Even though this will improve performance, it will increase the size of the program and will reduce the maintainability of the system. Every time a change is made in the subprogram all the impacted main programs will have to be re-link-edited. But if the LINK or XCTL is used in the main program only one copy of the subprogram will be shared among the main programs, which uses this subprogram in the same CICS region. Therefore, if the subprogram size is large and is used in many programs it Will be better to use LINK or XCTL instead of the CALL statement.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics