Home > Data Center Tips > CICS Newsletter > Using External Call Interface (EXCI) to access CICS
Data Center Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

CICS NEWSLETTER

Using External Call Interface (EXCI) to access CICS


Robert Crawford, Contributor
08.26.2008
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Being a TechTarget expert, I get a lot of questions about accessing CICS files from batch. CICS' External Call Interface (EXCI) is something I recommend as long as a programmer doesn't mind writing the code. But EXCI's utility is much broader because a "non-CICS environment" includes batch, as well as things like IMS message processing regions (MPRs) and system automation tools.

A carefully crafted application could use EXCI to get into CICS from just about anywhere on the mainframe.

API overview
Here are a few definitions before discussing the API:

  • Server Program: CICS program invoked through EXCI
  • Client Program: Program from a non-CICS environment using EXCI to invoke the server program.
  • Distributed Program Link (DPL): A CICS feature for function-shipped program links. An EXCI call looks like a DPL request to the server program.
  • Pipe: A logical view of the connection between the client program and CICS.

EXCI has two interfaces. First is the EXEC interface which is simpler but less efficient. To use the EXEC interface, the programmer codes a CICS LINK command just as done in CICS. But in distinction from a pure CICS program, the programmer must use the EXCI translator option and link edit the batch stub DFHXCSTB into the load module. When the client program executes the ,e server program. The LENGTH parameter specifies the total size of the COMMAREA, which must be large enough to contain the returned data. The optional DATALENGTH operand denotes the amount of actual data to send to the server. There are some performance gains for specifying DATALENGTH if the data sent is small relative to the information returned. The COMMAREA, of course, also has a 32K byte limit, which can be bothersome.

Lastly, the request must contain the name of the server program. An optional TRANSID parameter signifies the transaction under which you want the server program to execute. This is joyful for workload distribution and performance tuning. Otherwise the programmer may omit TRANSID and CICS defaults to the mirror transaction CSMI.

The target CICS
EXCI requests can be routed to a server CICS explicitly or implicitly. To be explicit, a command interface program need only specify a valid APPLID in the command or Allocate_pipe call.

An implicit call doesn't specify a target APPLID. Instead, it becomes the job of user replaceable module (URM) DFHXCURM to decide. CICS invokes DFHXCURM at different stages during an EXCI call. For two of these calls, allocate pipe request and retryable error, DFHXCURM decides where the request can go.

There are two things to note about DFHXCURM processing. First, it is only invoked when a pipe is about to be allocated, not for every message. Once a pipe is connected to CICS, DFHXCURM will not be invoked unless communication breaks. Second, EXCI invokes DFHXCURM for explicit routing requests as well to give the URM a chance to override the original request. IBM provides a sample DFHXCURM that's not very useful but does provide a good skeleton for writing your own. The target CICS can be an application owning region (AOR) that will execute the DPL directly or a routing region (RR) that function ships the request elsewhere. For production, an RR target is nice for workload balancing and availability. In addition, the client program has fewer worries under the assumption the RR will send the request to a healthy AOR.

Finally, the target CICS doesn't have to be on the same LPAR as the client. However, cross-system calls aren't recommended due to performance.

Data integrity
By default the client program controls syncpoints. However, to do so the client program must use the callable routines provided by the Recoverable Resource Services of MVS. Sadly, it adds to the complexity of the client program as it must not only keep track of uncommitted resources, it also has to be restartable in case of an ABEND.

The SYNCONRETURN parameter (or proper DPL_opts setting for the call interface) is much easier. This option causes CICS to commit recoverable resources when the server program returns. However, both the client and the server should support the small units of work.

ABOUT THE AUTHOR: For 24 years, Robert Crawford has worked off and on as a CICS systems programmer. He is experienced in debugging and tuning applications and has written in COBOL, Assembler and C++ using VSAM, DLI and DB2.

Did you find this helpful? Write to Matt Stansberry about your data center concerns at mstansberry@techtarget.com.

Rate this Tip
To rate tips, you must be a member of SearchDataCenter.com.
Register now to start rating these tips. Log in if you are already a member.




BROWSE BY TAG
Server hardware,   Mainframe computers,   CICS Newsletter,   VIEW ALL TAGS

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Mainframe computers
The mainframe is 45 years old
Using CICS dump tables to manage problems in online systems
High mainframe software costs may lead to platform's demise
Manage CICS workloads with transaction classes
Run CICS in batch to beat a shrinking batch window
Analyst group disses Hewlett-Packard report about mainframe migration
Mainframers go for a jog at Share user group conference
Mainframe student anticipates a bright future
HP puts fault-tolerant NonStop on a blade
A review of z/OS 1.9 features

CICS Newsletter
IBM z/OS 1.11 preview: New features and functions
New statistics for CICS Transaction Server 3.2
Manage CICS workloads with transaction classes
Run CICS in batch to beat a shrinking batch window
Ensuring CICS security with the Web Services Security standard
Use DFHLS2WS to expose CICS applications as a Web service
Using IBM IPCS to battle software bugs
CICS and Web services: Ready to go
Using CICS event monitoring points (EMPs) for tuning and debugging
Implementing CICS managed data tables

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
ACF2  (SearchDataCenter.com)
Calibrated Vectored Cooling  (SearchDataCenter.com)
enclave  (SearchDataCenter.com)
IMS (Information Management System)  (SearchDataCenter.com)
job  (SearchDataCenter.com)
job scheduler  (SearchDataCenter.com)
job step  (SearchDataCenter.com)
MVS  (SearchDataCenter.com)
z/OS  (SearchDataCenter.com)
z990  (SearchDataCenter.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



White Papers - Data Center Networking

The Intel IT Technology Center - Power, Performance and Mobility Solutions

HomeNewsTopicsITKnowledge ExchangeTipsBlogsMultimediaWhite PapersEvents
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts