This column originally appeared on TechTarget's Expert Answer Center as a post in Robert Crawford's blog. Robert...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
served as the on-demand expert on the Expert Answer Center for two weeks in January to February 2006, during which he was available to quickly answer questions on CICS application performance and design, as well as to write daily blog entries. Keep an eye on the Expert Answer Center for topics that could help your IT shop.
There have recently been some questions regarding which is more efficient; calling another program through native language services or issuing an EXEC CICS LINK command. I can relate from some personal observations that a native language is more efficient, especially if you're using a language requiring a lot of setup, such as C++.
The main problem with using CICS commands is the Language Environment (LE) runtime creates a new enclave for every LINK. Enclave creation is not an easy thing. It involves getting storage for the initial stack and heap allocations (below and above the line), as well as all the block structures. In addition, if you're using C++, there's plenty more to do to build the language environment and initialize objects before any application code runs.
In contrast, a language call avoids enclave creation. The called program's heap and stack are taken out of storage already allocated to the transaction. If there isn't enough room LE getmains more. For C++ most of the work involved in building the language environment is done.
There is a major drawback to using language calls. When you use program calls LE first issues a CICS LOAD for the target program, then branches into it. This logic means the application can't use distributed program link (DPL) and thus binds the transaction to one region. This is not good if you want CICSPlex-capable applications. A compromise solution might be to write code that calls local programs and LINKs to remote ones, but I'm uncomfortable with that because applications shouldn't have to worry that much about their environment.
I guess the upshot is using EXEC CICS LINK commands is fine most of the time. However, you may want to consider language calls when you need a performance boost, are calling a non-CICS program or using a CPU intense language like C++.